Run the migrations.

@return void
500474
public function migrateUp()
    {
        Schema::table('tddd_runs', function (Blueprint $table) {
            $table->mediumText('log_new')->nullable()->after('was_ok');
        });

        Database::statement('update tddd_runs set log_new = log;');

        Schema::table('tddd_runs', function (Blueprint $table) {
            $table->dropColumn('log');
            $table->renameColumn('log_new', 'log');
        });
    }
378472
public function up()
    {
        Schema::create('posts', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedBigInteger('user_id')->nullable();
            $table->string('type');
            $table->string('status')->nullable();
            $table->jsonb('content')->nullable();
            $table->jsonb('options')->nullable();
            $table->string('slug')->unique();
            $table->timestamp('publish_at')->nullable()->useCurrent();
            $table->timestamps();
            $table->softDeletes();
            $table->index(['status', 'type']);

            $table->foreign('user_id')
                ->references('id')
                ->on('users')
                ->onUpdate('cascade')
                ->onDelete('cascade');
        });
    }
552592
public function up()
    {
        Schema::create(\Config::get('registry.table', 'system_registries'), function(Blueprint $table)
        {
            $table->string('key');
            $table->text('value');

            $table->primary('key');
        });
    }
1350716
public function up()
    {
        Schema::create('posts', function (Blueprint $table) {
            $table->increments('id');

            $table->string('title');
            $table->string('slug');
            $table->string('category')->nullable();
            $table->text('excerpt')->nullable();
            $table->longText('content')->nullable();
            $table->longText('featured_media')->nullable();
            $table->timestamp('published_at')->nullable();

            $table->integer('author_user_id')->unsigned()->nullable();

            $table->foreign('author_user_id')
                ->references('id')
                ->on('users')
                ->onDelete('cascade')
                ->onUpdate('cascade');

            $table->nullableTimestamps();
            $table->softDeletes();
        });
    }
1308151
public function up()
    {
        Schema::create('users', function (Blueprint $table) {

            $table->increments('id');
            $table->string('name', 100);
            $table->string('email', 100)->unique();
            $table->string('password');
            $table->string('role', 100)->default('user');

            $table->string('avatar', 100)->nullable();
            $table->text('info')->length(500)->nullable();
            $table->string('where_from')->nullable();
            $table->rememberToken();
            $table->string('api_token', 32)->nullable(); // md5(str_random(16));
            $table->ipAddress('last_ip')->nullable();

            $table->index('name');

            $table->timestamps();
            $table->timestamp('logined_at')->nullable();
        });
    }
1195178
public function up()
    {
        $this->createSchema(function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->unsignedBigInteger('domain_id')->index();
            $table->string('url')->index();
            $table->string('host');
            $table->string('medium')->nullable()->index();
            $table->string('source')->nullable()->index();
            $table->string('search_terms_hash')->nullable()->index();
            $table->timestamp('created_at')->index();
            $table->timestamp('updated_at')->index();
        });
    }
1088419
public function up()
    {
        Schema::create('pages', function (Blueprint $table) {
            $table->increments('id');
            $table->string(Entity::getUrlIDField())->unique();
            $table->string(Entity::getStringIdField())->unique();
            $table->string('title');
            $table->string('meta_title');
            $table->string('meta_description');
            $table->string('meta_keywords');
            $table->tinyInteger('status')->default(Entity::STATUS_PUBLISHED);
            $table->timestamps();
        });
    }
825663
public function up()
    {
        Schema::create(
            'option_categories',
            function (Blueprint $table) {
                $table->string('key');
                $table->timestamps();
                $table->primary('key');
            }
        );

        Schema::create(
            'options',
            function (Blueprint $table) {
                $table->increments('id');
                $table->string('key');
                $table->string('category_key');
                $table->text('value');
                $table->timestamps();
                $table->foreign('category_key')->references('key')->on('option_categories')->onDelete('CASCADE');
                $table->index(['category_key', 'key']);
            }
        );

        // Seed options
        $this->seedOptions();
    }
203907
public function up()
    {
        Schema::create('user_groups', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('user_id');
            $table->unsignedInteger('group_id');

            $table->foreign('user_id')->references('id')->on(config('membership.users.table'));
            $table->foreign('group_id')->references('id')->on('groups');

            $table->unique(['user_id', 'group_id']);
            $table->index(['user_id', 'group_id']);
        });
    }
888822
public function up()
    {
    	if (Schema::hasTable('users')) {

    		Schema::table('users', function (Blueprint $table) {
	            
	            if (!Schema::hasColumn('users', 'is_admin')) {

	            	$table->tinyInteger('is_admin')->default(0)->comment('1: admin, 0: not is admin');
	            }

	            if (!Schema::hasColumn('users', 'name')) {
	            	$table->string('name');
	            }
	            
	            if (!Schema::hasColumn('users', 'email')) {
	            	$table->string('email')->unique();
	            }

	            if (!Schema::hasColumn('users', 'password')) {
	            	$table->string('password');
	            }

	            if (!Schema::hasColumn('users', 'remember_token')) {
	            	$table->rememberToken();
	            }


	        });
    	}

    	else {

    		Schema::create('users', function (Blueprint $table) {
	            $table->increments('id');
	            $table->string('name');
	            $table->string('email')->unique();
	            $table->string('password');
	            $table->tinyInteger('is_admin')->default(0)->comment('1: admin, 0: not is admin');
	            $table->rememberToken();
	            $table->timestamps();
	        });
    	}
        
    }
974226
public function up()
	{
		Schema::table('users', function(Blueprint $table)
		{
			$table->string('lastname',255);
			$table->string('surname',255);
			$table->boolean('active')->default(false);
		});
	}
477525
public function up()
    {
        Schema::create('preferences', function (Blueprint $table) {
            $table->increments('id');
            $table->string('key');
            $table->string('value');
            $table->enum('type', ['string', 'bool', 'int', 'float', 'array', 'time', 'json'])->default('string');
            $table->string('preferenceable_type');
            $table->integer('preferenceable_id')->unsigned();
            $table->nullableTimestamps();

            $table->unique(['key', 'preferenceable_type', 'preferenceable_id']);
        });
    }
377408
public function up()
    {
        $this->createSchema(function (Blueprint $table) {
            $table->string('email');
            $table->string('token');
            $table->timestamp('created_at')->nullable();

            $table->index(['email', 'token']);
        });
    }
488580
public function up()
    {
        Schema::create('user_action_timestamps', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->timestamp('activated_at')->nullable();
            $table->timestamp('invited_at')->nullable();
            $table->timestamp('blocked_at')->nullable();
            $table->timestamp('password_updated_at')->nullable();
            $table->softDeletes();

            $table->foreign('user_id')
                ->references('id')
                ->on('users')
                ->onDelete('cascade');
        });
    }
1201881
public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('email')->unique();
            $table->string('password');
            $table->boolean('activated')->default(0);
            $table->boolean('superuser')->default(0);
            $table->string('first_name')->nullable();
            $table->string('last_name')->nullable();
            $table->text('preferences')->nullable();
            $table->uuid('api_token')->unique();
            $table->timestamp('email_verified_at')->nullable();
            $table->rememberToken();
            $table->timestamps();
        });
    }
1049759
public function up()
    {

        Schema::create('users', function (Blueprint $table) {

            $table->bigInteger('id')->primary();
            $table->integer('group_id');
            $table->string('name')->unique();
            $table->string('email')->unique()->nullable();
            $table->boolean('active')->default(true);
            $table->string('character_owner_hash');
            $table->dateTime('last_login')->nullable();
            $table->string('last_login_source')->nullable();
            $table->rememberToken();

            $table->index('group_id');

            $table->timestamps();
        });
    }
198155
public function up() {
        Schema::create('languages', function (Blueprint $table) {
            $table->increments('id');
            $table->char('slug', 2)->unique();
            $table->string('title', 30);
            $table->tinyInteger('rank')->unsigned()->default(1);
            $table->boolean('active')->default(1);

            $table->index('active');
            $table->index('rank');
        });
    }