Run the migrations.

@return void
509719
public function up()
	{
		Schema::create('SYS_Account_Type', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name',60);
			$table->string('lang_key',100)->nullable();
			$table->char('key', 1);
			$table->char('pl_bs_category', 1);
			$table->char('deferral_method', 1);

			//Timestamps
			$table->timestamps(); //Adds created_at and updated_at columns
			$table->softDeletes(); //Adds deleted_at column for soft deletes
		});

		Schema::create('SYS_Account_Chart_Type', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name',60);
			$table->string('url');
			$table->string('lang_key',100)->nullable();

			//Foreign Keys
			$table->unsignedInteger('country_id')->nullable();
			$table->foreign('country_id')->references('id')->on('SYS_Country');

			//Timestamps
			$table->timestamps(); //Adds created_at and updated_at columns
			$table->softDeletes(); //Adds deleted_at column for soft deletes
		});

		Schema::create('SYS_Voucher_Type', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('name');
			$table->string('lang_key',100)->nullable();
			$table->char('key', 1)->nullable();

			//Timestamps
			$table->timestamps(); //Adds created_at and updated_at columns
			$table->softDeletes(); //Adds deleted_at column for soft deletes
		});

		Schema::create('SYS_Account', function(Blueprint $table)
		{
			$table->increments('id');
			$table->string('key');
			$table->string('parent_key')->nullable();
			$table->string('name');
			$table->char('balance_type', 1);
			$table->char('account_type_key', 1);
			$table->boolean('is_group')->default(false);

			//Foreign Keys
			$table->unsignedInteger('account_chart_type_id')->nullable();
			$table->foreign('account_chart_type_id')->references('id')->on('SYS_Account_Chart_Type');

			//Timestamps
			$table->timestamps(); //Adds created_at and updated_at columns
			$table->softDeletes(); //Adds deleted_at column for soft deletes
		});

	}
1090524
public function up()
    {
        Schema::table('users', function ($table) {
            $table->integer('role_id')->unsigned()->nullable()->after('id');
            $table->foreign('role_id')->references('id')->on('roles')->onDelete('set null')->onUpdate('cascade');
        });
    }
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();
        });
    }
682410
public function up()
    {
        Schema::create('objects', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id');
            $table->integer('image_id')->unsigned()->nullable();
            $table->json('status');
            $table->json('title');
            $table->json('slug');
            $table->json('summary');
            $table->json('body');
            $table->timestamps();
        });
    }
1266999
public function up()
    {
        Schema::table(config('cms.db-prefix', '').'pages', function (Blueprint $table) {
            $table->text('blocks')->nullable();
        });

        Schema::table(config('cms.db-prefix', '').'blogs', function (Blueprint $table) {
            $table->text('blocks')->nullable();
        });

        Schema::table(config('cms.db-prefix', '').'events', function (Blueprint $table) {
            $table->text('blocks')->nullable();
        });
    }
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');
        });
    }
637332
public function up()
    {
        Schema::create('people', function (Blueprint $table) {
            $table->integer('id', true, true);
            $table->string('name', 191)->nullable();
            $table->string('email', 191);
            $table->boolean('enabled')->default(1);
            $table->string('password', 60)->nullable();
            $table->boolean('superuser')->default(false);
            $table->rememberToken();
            $table->unique(['email', 'deleted_at']);
            $table->index(['deleted_at', 'name']);
            $table->softDeletes();
            $table->integer('deleted_by')->unsigned()->nullable();
            $table->timestamp('last_login')->nullable();

            $table
                ->foreign('deleted_by')
                ->references('id')
                ->on('people')
                ->onDelete('set null');
        });
    }
374202
public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->string('name', 64)->change();
            $table->string('email', 64)->nullable()->change();
            $table->string('password', 64)->nullable()->change();
            $table->char('locale', 5);
            $table->char('currency', 3);
            $table->integer('joined')->unsigned();
            $table->integer('last_login')->unsigned();
            $table->tinyInteger('notifications')->unsigned();

            $table->renameColumn('id', 'user_id');
            $table->renameColumn('name', 'username');
            $table->dropColumn('created_at');
            $table->dropColumn('updated_at');
        });

        Schema::create('categories', function (Blueprint $table) {
            $table->mediumInteger('category_id', true)->unsigned();
            $table->mediumInteger('parent_category_id')->nullable()->unsigned();
            $table->string('name', 128);
            $table->string('slug', 32);
            $table->tinyInteger('sort')->unsigned();

            $table->foreign('parent_category_id')->references('category_id')->on('categories');
            $table->unique(['parent_category_id', 'slug']);
        });

        Schema::create('item_conditions', function (Blueprint $table) {
            $table->mediumInteger('item_condition_id', true)->unsigned();
            $table->string('name', 64);
            $table->tinyInteger('sort')->unsigned();
        });

        Schema::create('listing_durations', function (Blueprint $table) {
            $table->mediumInteger('listing_duration_id', true)->unsigned();
            $table->integer('duration')->unsigned();
            $table->tinyInteger('sort')->unsigned();
        });

        Schema::create('items', function (Blueprint $table) {
            $table->integer('item_id')->unsigned();
            $table->string('name', 128);
            $table->mediumInteger('item_condition_id')->unsigned();
            $table->integer('user_id')->unsigned();
            $table->text('description');
            $table->boolean('auction');
            $table->integer('quantity')->unsigned();
            $table->decimal('start_price', 8, 2)->nullable()->unsigned();
            $table->decimal('reserve_price', 8, 2)->nullable()->unsigned();
            $table->decimal('bidding_price', 8, 2)->nullable()->unsigned();
            $table->decimal('fixed_price', 8, 2)->nullable()->unsigned();
            $table->decimal('commission', 5, 2)->unsigned();
            $table->integer('winning_bid_id')->nullable()->unsigned();
            $table->integer('duration')->unsigned();
            $table->integer('start_date')->unsigned();
            $table->integer('end_date')->unsigned();
            $table->integer('created')->unsigned();
            $table->string('collection_location')->nullable();
            $table->boolean('payment_other');
            $table->tinyInteger('returns_period')->nullable()->unsigned();

            $table->primary('item_id');
            $table->foreign('user_id')->references('user_id')->on('users');
            $table->foreign('item_condition_id')->references('item_condition_id')->on('item_conditions');
        });

        Schema::create('item_categories', function (Blueprint $table) {
            $table->integer('item_id')->unsigned();
            $table->mediumInteger('category_id')->unsigned();

            $table->primary(['item_id', 'category_id']);
            $table->foreign('item_id')->references('item_id')->on('items');
            $table->foreign('category_id')->references('category_id')->on('categories');
        });

        Schema::create('delivery_options', function (Blueprint $table) {
            $table->integer('delivery_option_id', true)->unsigned();
            $table->integer('item_id')->unsigned();
            $table->string('name', 64);
            $table->float('price', 5, 2)->unsigned();
            $table->tinyInteger('min_arrival_time')->unsigned();
            $table->tinyInteger('max_arrival_time')->unsigned();

            $table->foreign('item_id')->references('item_id')->on('items');
        });

        Schema::create('failed_jobs', function (Blueprint $table) {
            $table->increments('failed_job_id');
            $table->text('connection');
            $table->text('queue');
            $table->text('payload');
            $table->timestamp('failed_at');
        });

        Schema::create('watched_items', function (Blueprint $table) {
            $table->integer('item_id')->unsigned();
            $table->integer('user_id')->unsigned();
            $table->integer('added')->unsigned();

            $table->primary(['item_id', 'user_id']);
            $table->foreign('item_id')->references('item_id')->on('items');
            $table->foreign('user_id')->references('user_id')->on('users');
        });

        $conditions = [
            'New',
            'Used',
            'Refurbished',
            'Faulty / Spares',
        ];

        foreach ($conditions as $condition) {
            $item_condition = new ItemCondition();

            $item_condition->name = $condition;

            $item_condition->save();
        }

        $durations = [
            86400,
            86400 * 3,
            86400 * 7,
            86400 * 14,
            86400 * 28,
        ];

        foreach ($durations as $duration) {
            $listing_duration = new ListingDuration();

            $listing_duration->duration = $duration;

            $listing_duration->save();
        }
    }
586824
public function up(): void
    {
        Schema::create('bans', function (Blueprint $table) {
            $table->increments('id');
            $table->morphs('bannable');
            $table->nullableMorphs('created_by');
            $table->text('comment')->nullable();
            $table->timestamp('expired_at')->nullable();
            $table->softDeletes();
            $table->timestamps();

            $table->index('expired_at');
        });
    }
967651
public function up()
    {
        Schema::table('users', function (Blueprint $table) {
            $table->timestamp('last_login')->nullable();
            $table->jsonb('permissions')->nullable();
        });
    }
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');
        });
    }
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();
        });
    }
287295
public function up()
	{
		Schema::create($this->table, function($t)
		{
			$t->increments('id')->unsigned();
			$t->string('username', 100);
			$t->string('email');

			$t->timestamps();
			$t->softDeletes();

            $t->index('username');
            $t->index(array('deleted_at', 'username'));
        });
    }
1260883
public function up()
    {
        Schema::create('permission_user', function (Blueprint $table) {
            $table->unsignedInteger('permission_id');
            $table->unsignedInteger('user_id');
            $table->string('user_type');

            $table->foreign('permission_id')->references('id')->on('permissions')
                ->onUpdate('cascade')->onDelete('cascade');

            $table->primary(['user_id', 'permission_id', 'user_type']);
        });
    }
1236197
public function up()
    {
        Schema::create('user_role', function (Blueprint $table) {
            $table->bigIncrements('id');

            $table->bigInteger('user_id')->unsigned();
            $table->bigInteger('role_id')->unsigned();

            $table->nullableTimestamps();

            $table->index(['user_id', 'role_id']);
        });
    }
1051884
public function up()
    {
        Schema::create('comments', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('post_id')->nullable();
            $table->unsignedBigInteger('user_id')->nullable();
            $table->integer('parent_id')->nullable();
            $table->text('content');
            $table->boolean('approved')->nullable();
            $table->timestamps();

            $table->index(['approved', 'post_id']);
            $table->index('post_id');
            $table->index('parent_id');
            $table->foreign('post_id')
                ->references('id')
                ->on('posts')
                ->onUpdate('cascade')
                ->onDelete('cascade');
            $table->foreign('user_id')
                ->references('id')
                ->on('users')
                ->onUpdate('cascade')
                ->onDelete('cascade');
        });
    }
1108754
public function up()
    {
        Schema::create('scaffoldinterfaces', function (Blueprint $table) {
            $table->increments('id')->unsigned();
            $table->String('package');
            $table->String('migration');
            $table->String('model');
            $table->String('controller');
            $table->String('views');
            $table->String('tablename');
            $table->timestamps();
        });
        Schema::create('relations', function (Blueprint $table) {
            $table->increments('id')->unsigned();
            $table->integer('scaffoldinterface_id')->unsigned();
            $table->String('to');
            $table->String('having');
            $table->foreign('scaffoldinterface_id')->references('id')->on('scaffoldinterfaces')->onDelete('cascade');
            $table->timestamps();
        });
    }