Run the migrations.

@return void
7506
public function up()
    {
        Schema::create($this->table_name, function ($table) {
            $table->increments('id')->unsigned();
            $table->string('name');
            $table->string('code', 10)->index();
            $table->string('symbol', 25);
            $table->string('format', 50);
            $table->string('exchange_rate');
            $table->boolean('active')->default(false);
            $table->timestamps();
        });
    }
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');
        });
    }
804004
public function up()
    {

        Schema::table('group_role', function (Blueprint $table) {

            $table->boolean('not')->after('group_id')->default(false);
        });

        Schema::table('permission_role', function (Blueprint $table) {

            $table->boolean('not')->after('role_id')->default(false);
        });

        Schema::table('affiliation_user', function (Blueprint $table) {

            $table->boolean('not')->after('affiliation_id')->default(false);
        });

        Schema::table('affiliation_role', function (Blueprint $table) {

            $table->boolean('not')->after('affiliation_id')->default(false);
        });
    }
877007
public function up()
    {
        Schema::create('config_categories', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('parent_id')->nullable();
            $table->unsignedInteger('package_id');
            $table->string('key')->unique();
            $table->timestamps();

            $table->foreign('package_id')->references('id')->on('packages');
            $table->foreign('parent_id')->references('id')->on('config_categories');
        });

        Schema::create('configs', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('config_category_id');
            $table->string('key');
            $table->string('value');
            $table->timestamps();

            $table->foreign('config_category_id')->references('id')->on('config_categories');
        });

        $this->config = new Config();
        $this->categories();
    }
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();
        });
    }
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']);
            });
        }
	}
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');

        });
    }
363552
public function up()
    {
        Schema::create('user_permissions', function (Blueprint $table) {
			$table->char("user_id", 32)->nullable();
			$table->char("permission_id", 32)->nullable();
            $table->timestamps();
        });
    }
578981
public function up()
    {
        Schema::create('tags', function (Blueprint $table) {
            $table->uuid('id')->primary('id');
            $table->uuid('user_id')->index();
            $table->string('text', 64)->index('text');
            $table->timestamps();

            $table->unique(['user_id', 'text']);

            $table->foreign('user_id')->references('id')->on('users');
        });

    }
271364
public function up()
    {

        Schema::create('User', function (Blueprint $table) {
            $table->increments('id');
            $table->string('username', 25)->nullable()->unique();
            $table->string('password', 60)->nullable();
            $table->string('first_name', 25);
            $table->string('last_name', 25);
            $table->string('email')->unique();
            $table->text('description')->nullable();
            $table->timestamp('birthday')->nullable();
            $table->string('pic')->nullable();
            $table->integer('gender');
            $table->tinyInteger('status');
            $table->string('ip', 15);
            $table->tinyInteger('staff');
            $table->tinyInteger('force_new_password');
            $table->timestamp('last_login')->nullable();
            $table->text('permissions')->nullable();
            $table->rememberToken();
            $table->timestamps();
            $table->softDeletes();
            $table->creation();
        });

        Schema::table('User', function (Blueprint $table) {
            $table->creationRelation();
        });

        Schema::create('Visits', function (Blueprint $table) {
            $table->increments('id');
            $table->string('url')->nullable();
            $table->string('ip', 15)->nullable();
            $table->string('browser')->nullable();
            $table->tinyInteger('checked');

            $table->string('isoCode')->nullable();
            $table->string('country')->nullable();
            $table->string('city')->nullable();
            $table->string('state')->nullable();
            $table->string('postal_code')->nullable();
            $table->string('lat')->nullable();
            $table->string('lon')->nullable();
            $table->string('timezone')->nullable();
            $table->string('continent')->nullable();
            $table->timestamps();
        });

        Schema::create('Logs', function (Blueprint $table) {
            $table->increments('id');
            $table->text('log');
            $table->integer('target')->nullable();
            $table->string('ip', 15)->nullable();
            $table->timestamps();
            $table->creation();
        });

        Schema::table('Logs', function (Blueprint $table) {
            $table->creationRelation();
        });

        Schema::create('Settings', function (Blueprint $table) {
            $table->increments('id');
            $table->string('friendly_name', 25);
            $table->string('name', 25);
            $table->string('value', 150)->nullable();
            $table->string('description', 250)->nullable();
            $table->timestamps();
            $table->creation();
        });

        Schema::table('Settings', function (Blueprint $table) {
            $table->creationRelation();
        });

        Schema::create('Group', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 25);
            $table->string('description', 250)->nullable();
            $table->string('slug', 250);
            $table->text('permissions')->nullable();

            $table->timestamps();
            $table->softDeletes();
            $table->creation();

            $table->unique('slug');
        });

        Schema::table('Group', function (Blueprint $table) {
            $table->creationRelation();
        });

        Schema::create('Group_User', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user')->unsigned();
            $table->integer('group')->unsigned();

            $table->timestamps();
            $table->softDeletes();
            $table->creation();

            $table->foreign('user')->references('id')->on('User');
            $table->foreign('group')->references('id')->on('Group');
        });

        Schema::table('Group_User', function (Blueprint $table) {
            $table->creationRelation();
        });

        Schema::create('ActivityFeed', function (Blueprint $table) {
            $table->increments('id');
            $table->string('added_by', 150);
            $table->text('activity');
            $table->string('icon', 100);
            $table->string('link', 250)->nullable();
            $table->text('permissions')->nullable();

            $table->timestamps();
        });

    }
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');
        });
    }
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');
            }
        );
    }
946503
public function up()
	{
		Schema::create('tags', function($table)
		{
			$table->integer('post_id');
			$table->string('tag');
			$table->unique(array('post_id', 'tag'));
		});
	}
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');
        });
    }
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']);
        });
    }
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');
        });
    }
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();
	        });
    	}
        
    }