Run the migrations.

@return void
556534
public function up()
    {
        Schema::create('permissions', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('key')->unique();
            $table->timestamps();
        });

        Schema::create('role_permissions', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('role_id');
            $table->unsignedInteger('permission_id');
            $table->boolean('value')->default(false);
            $table->timestamps();

            $table->foreign('role_id')->references('id')->on('roles');
            $table->foreign('permission_id')->references('id')->on('permissions');
        });

        $this->default();
    }
1175017
public function up()
    {
        Schema::create('roles', function (Blueprint $table) {
            $table->increments('id');
            $table->string('uuid', 36);
            $table->string('name', 80);
            $table->string('slug', 45);
            $table->string('description', 120);
            $table->tinyInteger('is_locked')->default(1)->comment('1 = Locked, 2 = Unlocked');
            $table->timestamps();
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
        });
    }
1067545
public function up()
    {
        Schema::create('groups', function (Blueprint $table) {
            $table->smallInteger('id', true)->unsigned();
            $table->string('name', 100)->nullable();
            $table->softDeletes();
            $table->integer('deleted_by')->unsigned()->nullable();
        });
    }
266083
public function up()
	{
        if( !Schema::hasTable('config')){
            Schema::create('config', function(Blueprint $table){
                $table->increments('id');
                $table->char('name');
                $table->text('value');
                $table->char('type');
                $table->timestamps();

                $table->index(['name', 'type']);
            });
        }
	}
101127
public function up()
    {
        Schema::create(self::table(), function (Blueprint $table) {
            $table->increments('id');
            $table->string('log_schema');
            $table->string('log_table');
            $table->enum('log_type',[self::TYPE_INSERT,self::TYPE_UPDATE,self::TYPE_DELETE]);
            $table->text('last_value')->nullable();
            $table->timestamp('log_at');
            $table->softDeletes();
        });
    }
938781
public function up()
    {
        Schema::create(config('cortex.auth.tables.roles'), function (Blueprint $table) {
            // Columns
            $table->increments('id');
            $table->string('name', 150);
            $table->{$this->jsonable()}('title')->nullable();
            $table->integer('level')->unsigned()->nullable();
            $table->integer('scope')->nullable();
            $table->auditableAndTimestamps();

            // Indexes
            $table->index(['scope']);
            $table->unique(['name', 'scope'], 'roles_name_unique');
        });
    }
539890
public function up()
    {
        Schema::table('comments', function ($table) {
            $table->integer('version')->unsigned()->default(1);
        });

        foreach (CommentProvider::all() as $comment) {
            $comment->update(array('version' => 1));
        }
    }
769996
public function up()
    {
        Schema::create('authentication_log', function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->morphs('authenticatable');
            $table->string('ip_address', 45)->nullable();
            $table->text('user_agent')->nullable();
            $table->timestamp('login_at')->nullable();
            $table->timestamp('logout_at')->nullable();
        });
    }
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();
	        });
    	}
        
    }
781397
public function up()
    {
        Schema::table('activity_log', function (Blueprint $table) {
            $table->string('log_name')->nullable();
            $table->string('description');
            $table->integer('subject_id')->nullable();
            $table->string('subject_type')->nullable();
            $table->integer('causer_id')->nullable();
            $table->string('causer_type')->nullable();
            $table->text('properties')->nullable();

            $table->dropColumn('ip_address');
            $table->dropColumn('user_id');
            $table->dropColumn('text');
        });
    }
1178543
public function up()
    {
        Schema::create(
            'contents',
            function (Blueprint $table) {
                $table->increments('id');
                $table->timestamps();
            }
        );

        Schema::create(
            'revisions',
            function (Blueprint $table) {
                $table->increments('id');
                $table->unsignedInteger('language_id');
                $table->unsignedInteger('content_id');
                $table->timestamps();

                $table->foreign('language_id')->references('id')->on('languages');
                $table->foreign('content_id')->references('id')->on('contents');
            }
        );

        Schema::create(
            'field_string',
            function (Blueprint $table) {
                $this->fieldTableFields($table);
                $table->string('value');
            }
        );

        Schema::create(
            'field_text',
            function (Blueprint $table) {
                $this->fieldTableFields($table);
                $table->text('value');
            }
        );

        Schema::create(
            'field_date',
            function (Blueprint $table) {
                $this->fieldTableFields($table);
                $table->date('value');
            }
        );

        Schema::create(
            'field_datetime',
            function (Blueprint $table) {
                $this->fieldTableFields($table);
                $table->datetime('value');
            }
        );

        Schema::create(
            'field_entity',
            function (Blueprint $table) {
                $this->fieldTableFields($table);
                $table->unsignedInteger('value');
                $table->foreign('value')->references('id')->on('contents');
            }
        );
    }
107134
public function up()
    {
        Schema::create(Models::table('abilities'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('title')->nullable();
            $table->integer('entity_id')->unsigned()->nullable();
            $table->string('entity_type')->nullable();
            $table->boolean('only_owned')->default(false);
            $table->json('options')->nullable();
            $table->integer('scope')->nullable()->index();
            $table->timestamps();
        });

        Schema::create(Models::table('roles'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('title')->nullable();
            $table->integer('level')->unsigned()->nullable();
            $table->integer('scope')->nullable()->index();
            $table->timestamps();

            $table->unique(
                ['name', 'scope'],
                'roles_name_unique'
            );
        });

        Schema::create(Models::table('assigned_roles'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer('role_id')->unsigned()->index();
            $table->integer('entity_id')->unsigned();
            $table->string('entity_type');
            $table->integer('restricted_to_id')->unsigned()->nullable();
            $table->string('restricted_to_type')->nullable();
            $table->integer('scope')->nullable()->index();

            $table->index(
                ['entity_id', 'entity_type', 'scope'],
                'assigned_roles_entity_index'
            );

            $table->foreign('role_id')
                  ->references('id')->on(Models::table('roles'))
                  ->onUpdate('cascade')->onDelete('cascade');
        });

        Schema::create(Models::table('permissions'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer('ability_id')->unsigned()->index();
            $table->integer('entity_id')->unsigned()->nullable();
            $table->string('entity_type')->nullable();
            $table->boolean('forbidden')->default(false);
            $table->integer('scope')->nullable()->index();

            $table->index(
                ['entity_id', 'entity_type', 'scope'],
                'permissions_entity_index'
            );

            $table->foreign('ability_id')
                  ->references('id')->on(Models::table('abilities'))
                  ->onUpdate('cascade')->onDelete('cascade');
        });
    }
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');
        });
    }
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();
        });
    }
208978
public function up()
    {
        Schema::table('fieldables', function (Blueprint $table) {
            $table->integer('position')->unsigned()->nullable()->default('1')->change();
        });
    }
57807
public function up()
    {
        Schema::table($this->getUserTableName(), function (Blueprint $table) {
            $table->boolean('verified')->default(false);
        });

    }
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']);
        });
    }