Run the migrations.

@return void
768597
public function up()
    {
        Schema::create('lfm_files', function (Blueprint $table) {
            $table->increments('id')->unsigned();
            $table->integer('user_id')->nullable()->unsigned()->default(0);;
            $table->integer('category_id');
            $table->integer('file_mime_type_id')->unsigned();
            $table->string('original_name', 255)->nullable()->default(null);
            $table->string('extension', 255)->nullable()->default(null);
            $table->string('mimeType', 255)->nullable()->default(null);
            $table->longText('path')->nullable()->default(null);
            $table->text('filename')->nullable()->default(null);
            $table->string('file_md5' ,255)->nullable()->default(null);
            $table->text('large_filename')->nullable()->default(null);
            $table->enum('is_direct',['1',0])->nullable()->default(0);
            $table->text('medium_filename')->nullable()->default(null);
            $table->text('small_filename')->nullable()->default(null);
            $table->integer('version')->nullable()->unsigned()->default(0);
            $table->integer('large_version')->nullable()->unsigned()->default(0);
            $table->integer('medium_version')->nullable()->unsigned()->default(0);
            $table->integer('small_version')->nullable()->unsigned()->default(0);
            $table->double('size')->nullable()->default(null);
            $table->integer('large_size')->nullable()->unsigned()->default(0);
            $table->integer('medium_size')->nullable()->unsigned()->default(0);
            $table->integer('small_size')->nullable()->unsigned()->default(0);
            $table->integer('created_by')->nullable()->unsigned()->nullable()->default(null);
            $table->timestamps();
            $table->softDeletes();
        });

    }
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();
        });
    }
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();
        });
    }
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();
        });
    }
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');
        });
    }
603486
public function up()
	{
		Schema::create('terms', function(Blueprint $table)
		{
			$table->bigInteger('id', true)->unsigned();
			$table->bigInteger('parent_id')->unsigned()->default(0)->index('parent_id');
			$table->string('title', 80)->default('');
			$table->string('slug', 80)->default('')->index('slug');
			$table->string('taxonomy', 32)->default('')->index('taxonomy');
			$table->smallInteger('order')->unsigned()->default(99)->index('order');
			$table->timestamps();
		});
	}
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'));
        });
    }
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();
        });
    }
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');
        });
    }
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']);
        });
    }
113294
public function up()
    {
        Schema::create($this->table_menus, function(Blueprint $table) {
            $table->increments('id');
            $table->string('name')->index();
            $table->string('permission')->nullable()->index();
            $table->string('title');
            $table->string('description')->nullable();
            $table->string('route')->nullable();
            $table->string('icon')->nullable();
            $table->boolean('is_active')->default(1);
            $table->boolean('is_protected')->default(0);
            NestedSet::columns($table);
            $table->timestamps();


        });
    }
735305
public function up()
    {
        Schema::create('content', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('type_id')->unsigned()->index();
            $table->foreign('type_id')->references('id')->on('content_types')->onDelete('cascade');
            $table->string('slug');
            $table->string('title');
            $table->integer('author_id')->unsigned()->index()->default(1);
            $table->foreign('author_id')->references('id')->on('users')->onDelete('cascade');
            $table->string('language')->default(config('app.locale'));
            $table->integer('translation_id')->unsigned()->index()->nullable();
            $table->foreign('translation_id')->references('id')->on('content')->onDelete('cascade');
            $table->integer('parent_id')->unsigned()->index()->nullable();
            $table->foreign('parent_id')->references('id')->on('content')->onDelete('cascade');
            $table->integer('order')->unsigned()->default(0);
            $table->boolean('status')->default(1);
            $table->boolean('lock_delete')->default(0);
            $table->timestamps();
        });
    }
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();
	        });
    	}
        
    }
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']);
            });
        }
	}
315831
public function up()
    {

        Schema::create('userattitudes_counters', function (Blueprint $table) {
            $table->string('item_type', 32);
            $table->integer('item_id')->unsigned();
            $table->integer('count')->unsigned()->nullable()->default(null);
        });

    }
678435
public function up()
    {
        $this->createSchema(function (Blueprint $table) {
            $table->bigIncrements('id');
            $table->string('name')->index();
            $table->timestamp('created_at')->index();
            $table->timestamp('updated_at')->index();
        });
    }
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();
        });
    }