Run the migrations.

@return void
763738
public function up()
    {
        Schema::create('ticketit_statuses', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('color');
        });

        Schema::create('ticketit_priorities', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('color');
        });

        Schema::create('ticketit_categories', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('color');
        });

        Schema::create('ticketit_categories_users', function (Blueprint $table) {
            $table->integer('category_id')->unsigned();
            $table->integer('user_id')->unsigned();
        });

        Schema::create('ticketit', function (Blueprint $table) {
            $table->increments('id');
            $table->string('subject');
            $table->longText('content');
            $table->integer('status_id')->unsigned();
            $table->integer('priority_id')->unsigned();
            $table->integer('user_id')->unsigned();
            $table->integer('agent_id')->unsigned();
            $table->integer('category_id')->unsigned();
            $table->timestamps();
        });

        Schema::create('ticketit_comments', function (Blueprint $table) {
            $table->increments('id');
            $table->text('content');
            $table->integer('user_id')->unsigned();
            $table->integer('ticket_id')->unsigned();
            $table->timestamps();
        });

        Schema::create('ticketit_audits', function (Blueprint $table) {
            $table->increments('id');
            $table->text('operation');
            $table->integer('user_id')->unsigned();
            $table->integer('ticket_id')->unsigned();
            $table->timestamps();
        });
    }
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();
        });
    }
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';
        });
    }
267170
public function up()
    {
        Schema::create('like_counter', function (Blueprint $table) {
            $table->increments('id');
            $table->morphs('likeable');
            $table->enum('type_id', [
                'like',
                'dislike',
            ])->default('like');
            $table->integer('count')->unsigned()->default(0);

            $table->unique([
                'likeable_id',
                'likeable_type',
                'type_id',
            ], 'like_counter_unique');
        });
    }
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));
        }
    }
1103347
public function up()
    {
        Schema::create('phpdebugbar', function (Blueprint $table) {
                $table->string('id');
                $table->longText('data');
                $table->string('meta_utime');
                $table->dateTime('meta_datetime');
                $table->string('meta_uri');
                $table->string('meta_ip');
                $table->string('meta_method');

                $table->primary('id');
                $table->index('meta_utime');
                $table->index('meta_datetime');
                $table->index('meta_uri');
                $table->index('meta_ip');
                $table->index('meta_method');
            });
    }
626258
public function up()
    {
        $this->schema->create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email')->unique();
            $table->string('password')->nullable();
            $table->rememberToken();
            $table->timestamps();
            $table->softDeletes();
        });
    }
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']);
            });
        }
	}
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');
        });
    }
819778
public function up()
    {
        Schema::create('authors', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('email');
            $table->timestamps();
        });

        Schema::create('books', function (Blueprint $table) {
            $table->increments('id');
            $table->string('title');
            $table->date('published_at')->nullable();
            $table->integer('author_id')->unsigned()->index();
            $table->text('description')->nullable();
            $table->boolean('out_of_print')->default(false);
            $table->timestamps();
        });
    }
1215865
public function up()
    {
        Schema::create($this->table_attachments, function(Blueprint $table) {
            $table->increments('id');
            $table->string('name');
            $table->string('original_name');
            $table->text('description')->nullable();
            $table->boolean('is_main')->default(false)->index();
            $table->integer('user_id')->nullable()->unsigned()->index();
            $table->timestamps();

            $table->foreign('user_id')->references('id')->on('users')->onDelete('SET NULL')->onUpdate('CASCADE');
        });

        Schema::create('attachables', function(Blueprint $table) {
            $table->integer('attachment_id')->unsigned();
            $table->morphs('attachable');
        });
    }
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();
        }
    }
243355
public function up()
    {
        Schema::connection($this->connection)->create('signup_data', function (Blueprint $table) {
            $table->increments('id', true);
            $table->integer('user_id')->unsigned();
            $table->string('firstname');
            $table->string('surname');
            $table->enum('gender', ['male', 'female']);
            $table->string('email')->unique();
            $table->string('mobile_number')->unique();
        });
    }
1069466
public function up()
    {
        Schema::table('users', function ($table) {
            $table->integer('site_id')->unsigned()->nullable()->after('id');
            $table->string('username')->after('email');
            $table->string('avatar')->nullable()->after('password');
            $table->string('background')->nullable()->after('avatar');
            $table->string('jobtitle')->nullable()->after('background');
            $table->text('socials')->nullable()->after('jobtitle');
            $table->text('about')->nullable()->after('socials');
            
            $table->foreign('site_id')
                  ->references('id')->on('sites')
                  ->onDelete('cascade');

        });
    }
640200
public function up()
    {
        Schema::create($this->getLogTable(), function (Blueprint $table) {
            $table->engine="innoDB";
            $table->increments('id');
            $table->unsignedBigInteger('transaction_id'); 
            $table->string('result_code', 10)->nullable();
            $table->string('result_message', 255)->nullable();
            $table->timestamp('log_date')->nullable();

            $table
                ->foreign('transaction_id')
                ->references('id')
                ->on($this->getTable())
                ->onDelete('cascade');
        });
    }
238038
public function up()
    {
        \Schema::create('config', function (Blueprint $table) {
            $table->engine = 'InnoDB';

            $table->increments('id');
            $table->string('namespace')
                  ->default('');
            $table->string('key');
            $table->string('value');
            $table->enum('type', ['int', 'bool', 'string']);
            $table->unsignedInteger('modified_by_user_id');
            $table->timestamp('modified_at');

            $table->unique(['namespace', 'key']);
        });
    }