Run the migrations.

@return null
508577
public function up()
    {
        Schema::create('files', function (Blueprint $table) {
            $table->engine = 'InnoDB';
            $table->increments('id');
            $table->integer('folder_id')->unsigned()->nullable();
            $table->enum('type', ['a', 'v', 'd', 'i', 'o', 'f'])->nullable();
            $table->string('name')->nullable();
            $table->string('path')->nullable();
            $table->string('extension', 8)->nullable();
            $table->string('mimetype', 100)->nullable();
            $table->integer('width')->unsigned()->nullable();
            $table->integer('height')->unsigned()->nullable();
            $table->integer('filesize')->unsigned()->nullable();
            $table->integer('position')->unsigned()->default(0);
            $table->json('description');
            $table->json('alt_attribute');
            $table->timestamps();
            $table->foreign('folder_id')->references('id')->on('files');
        });
    }
191146
public function up()
    {
        $this->create('migrations', function ($table) {
            // Place table rows here
            $table->increments('id');
            $table->string('migration');
            $table->integer('migrated');
            $table->timestamps();
        });
    }
1148439
public function up()
    {
        // Create table for storing roles
        Schema::create('roles', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->unique();
            $table->string('display_name')->nullable();
            $table->string('description')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });

        // Create table for storing users
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('first_name');
            $table->string('last_name');
            $table->integer('country_id')->unsigned();
            $table->string('phone_number')->nullable();
            $table->string('username');
            $table->string('password');
            $table->string('email')->unique();
            $table->string('slug')->unique();
            $table->integer('points')->default(0);
            $table->timestamp('last_login')->nullable();
            $table->string('remember_token');
            $table->boolean('state')->default(1);
            $table->timestamps();
            $table->softDeletes();

            $table->foreign('country_id')->references('id')->on('countries');
        });

        // Create table for associating roles to users (Many-to-Many)
        Schema::create('role_user', function (Blueprint $table) {
            $table->integer('user_id')->unsigned();
            $table->integer('role_id')->unsigned();

            $table->foreign('user_id')->references('id')->on('users')
                ->onUpdate('cascade')->onDelete('cascade');
            $table->foreign('role_id')->references('id')->on('roles')
                ->onUpdate('cascade')->onDelete('cascade');

            $table->primary(['user_id', 'role_id']);
            $table->softDeletes();
        });

        // Create table for storing permissions
        Schema::create('permissions', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->unique();
            $table->string('display_name')->nullable();
            $table->string('description')->nullable();
            $table->timestamps();
            $table->softDeletes();
        });

        // Create table for associating permissions to roles (Many-to-Many)
        Schema::create('permission_role', function (Blueprint $table) {
            $table->integer('permission_id')->unsigned();
            $table->integer('role_id')->unsigned();

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

            $table->primary(['permission_id', 'role_id']);
            $table->softDeletes();
        });
    }
348163
public function up()
    {
        Schema::create('articles', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned()->default(1);
            $table->integer('image_id')->unsigned()->nullable();
            $table->enum('state', ['draft', 'unpublished', 'published'])->default('unpublished');

            // Main content
            $table->string('title');
            $table->string('slug')->unique();
            $table->string('teaser')->nullable();
            $table->text('content');
            $table->string('img')->nullable();
            $table->string('description')->nullable();
            $table->string('keywords')->nullable();

            $table->boolean('on_mainpage')->nullable()->default(1);
            $table->boolean('is_favorite')->nullable()->default(0);
            $table->boolean('is_pinned')->nullable()->default(0);
            $table->boolean('is_catpinned')->nullable()->default(0);
            $table->tinyInteger('allow_com')->unsigned()->default(2); // 0 - no; 1 - yes; 2 - by default
            $table->enum('robots', ['noindex', 'nofollow', 'none'])->nullable(); // null - content="all"

            // Extension
            $table->unsignedInteger('shares')->length(10)->default(0);
            $table->unsignedInteger('views')->length(10)->default(0);
            $table->unsignedInteger('votes')->length(10)->nullable();
            $table->unsignedInteger('rating')->length(10)->nullable();

            $table->index('state');
            $table->index('user_id');
            $table->foreign('image_id')->references('id')->on('files')->onDelete('set null');
            $table->foreign('user_id')->references('id')->on('users')
                  ->onDelete('CASCADE') // Do not call the onDelete() method if you want the `NO ACTION` option.
                  ->onUpdate('CASCADE');

            $table->timestamps();
        });

        DB::statement('ALTER TABLE '.(DB::getTablePrefix()).'articles ADD FULLTEXT search(title, content)');
    }
893062
public function up()
    {
        Schema::create(config('admin.database.users_table'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('username', 190)->unique();
            $table->string('password', 60);
            $table->string('name');
            $table->string('avatar')->nullable();
            $table->string('remember_token', 100)->nullable();
            $table->timestamps();
        });

        Schema::create(config('admin.database.roles_table'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 50)->unique();
            $table->string('slug', 50)->unique();
            $table->timestamps();
        });

        Schema::create(config('admin.database.permissions_table'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 50)->unique();
            $table->string('slug', 50)->unique();
            $table->string('http_method')->nullable();
            $table->text('http_path')->nullable();
            $table->timestamps();
        });

        Schema::create(config('admin.database.menu_table'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer('parent_id')->default(0);
            $table->integer('order')->default(0);
            $table->string('title', 50);
            $table->string('icon', 50);
            $table->string('uri', 50)->nullable();
            $table->string('permission')->nullable();

            $table->timestamps();
        });

        Schema::create(config('admin.database.role_users_table'), function (Blueprint $table) {
            $table->integer('role_id');
            $table->integer('user_id');
            $table->index(['role_id', 'user_id']);
            $table->timestamps();
        });

        Schema::create(config('admin.database.role_permissions_table'), function (Blueprint $table) {
            $table->integer('role_id');
            $table->integer('permission_id');
            $table->index(['role_id', 'permission_id']);
            $table->timestamps();
        });

        Schema::create(config('admin.database.user_permissions_table'), function (Blueprint $table) {
            $table->integer('user_id');
            $table->integer('permission_id');
            $table->index(['user_id', 'permission_id']);
            $table->timestamps();
        });

        Schema::create(config('admin.database.role_menu_table'), function (Blueprint $table) {
            $table->integer('role_id');
            $table->integer('menu_id');
            $table->index(['role_id', 'menu_id']);
            $table->timestamps();
        });

        Schema::create(config('admin.database.operation_log_table'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id');
            $table->string('path');
            $table->string('method', 10);
            $table->string('ip');
            $table->text('input');
            $table->index('user_id');
            $table->timestamps();
        });
    }
1094182
public function up()
    {
        Schema::create('users', function (Blueprint $table) {
            $table->increments('id');
            $table->string('uuid', 36)->unique();
            $table->string('username', 120)->unique();
            $table->string('email_address', 120)->unique();
            $table->string('password', 36);
            $table->string('password_token', 120);
            $table->tinyInteger('status')->default(1)->comment('1 = Active, 2 = Inactive');
            $table->tinyInteger('is_vissible')->default(1)->comment('1 = Visible, 2 = Disable');
            $table->dateTime('last_seen');
            $table->rememberToken();
            $table->timestamps();
            $table->charset = 'utf8';
            $table->collation = 'utf8_general_ci';
        });
    }
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();
        });
    }
1014620
public function up()
    {

        Schema::table('admin_actions', function (Blueprint $table) {
            $table->create();
            $table->increments('id');
            $table->integer('controller_id');
            $table->string('action');
            $table->integer('inherit')->default(0);
            $table->integer('edit_based')->default(0);
            $table->string('name');
            $table->text('about')->nullable();
            $table->timestamps();
        });

        $date = new Carbon;

        DB::table('admin_actions')->insert(
            array(
                array(
                    'controller_id' => 1,
                    'action' => 'index',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'Dashboard',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 1,
                    'action' => 'logs',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'View Admin Logs',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 1,
                    'action' => 'your-requests',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'View publish requests',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 1,
                    'action' => 'requests',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'View requests to moderate',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Show Page Management',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'sort',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Sort Pages',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'add',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Add Pages',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'edit',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Edit Pages',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'delete',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Delete Pages',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'version-publish',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Publish Versions',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'version-rename',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Rename Versions',
                    'about' => 'required to be logged is as author or have publishing permission',
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'versions',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Ajax Versions Table',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'request-publish',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Make Requests',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'request-publish-action',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Action Requests (cancel/approve/deny)',
                    'about' => 'required to be logged in as author to cancel or else have publish permissions',
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'requests',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Ajax Requests Table',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 2,
                    'action' => 'tinymce-page-list',
                    'inherit' => 5,
                    'edit_based' => 0,
                    'name' => 'TinyMce Page Links',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 3,
                    'action' => 'pages',
                    'inherit' => 5,
                    'edit_based' => 0,
                    'name' => 'List Group Pages',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 4,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Show Menu Items',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 4,
                    'action' => 'sort',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Sort Menu Items',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 4,
                    'action' => 'add',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Add Menu Items',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 4,
                    'action' => 'delete',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Delete Menu Items',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 4,
                    'action' => 'rename',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Rename Menu Items',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 4,
                    'action' => 'get-levels',
                    'inherit' => 19,
                    'edit_based' => 0,
                    'name' => 'Get Subpage Level',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 4,
                    'action' => 'save-levels',
                    'inherit' => 22,
                    'edit_based' => 0,
                    'name' => 'Set Subpage Level',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 5,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Edit Site-wide Content',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 6,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'View Files',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 6,
                    'action' => 'edit',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Manage Files',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 7,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'View Redirects',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 7,
                    'action' => 'edit',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Manage Redirects',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 7,
                    'action' => 'import',
                    'inherit' => 29,
                    'edit_based' => 0,
                    'name' => 'Import Redirects',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 8,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Show Account Settings',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 8,
                    'action' => 'password',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Change Password',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 8,
                    'action' => 'blog',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Auto Blog Login',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 9,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Show System Settings',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 9,
                    'action' => 'update',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Updates System Settings',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 9,
                    'action' => 'search',
                    'inherit' => 35,
                    'edit_based' => 0,
                    'name' => 'Rebuild Search Indexes',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 9,
                    'action' => 'validate-db',
                    'inherit' => 35,
                    'edit_based' => 0,
                    'name' => 'Validate Database',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 9,
                    'action' => 'wp-login',
                    'inherit' => 33,
                    'edit_based' => 0,
                    'name' => 'WordPress Auto Login Script',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 10,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'View User List',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 10,
                    'action' => 'edit',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Edit Users',
                    'about' => 'can edit roles of users (restricted by admin level)',
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 10,
                    'action' => 'add',
                    'inherit' => 40,
                    'edit_based' => 0,
                    'name' => 'Add Users',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 10,
                    'action' => 'delete',
                    'inherit' => 40,
                    'edit_based' => 0,
                    'name' => 'Remove Users',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 11,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Role Management',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 11,
                    'action' => 'add',
                    'inherit' => 43,
                    'edit_based' => 0,
                    'name' => 'Add Roles',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 11,
                    'action' => 'edit',
                    'inherit' => 43,
                    'edit_based' => 0,
                    'name' => 'Edit Roles',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 11,
                    'action' => 'delete',
                    'inherit' => 43,
                    'edit_based' => 0,
                    'name' => 'Delete Roles',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 11,
                    'action' => 'actions',
                    'inherit' => 43,
                    'edit_based' => 0,
                    'name' => 'Ajax Get Role Actions',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 11,
                    'action' => 'pages',
                    'inherit' => 43,
                    'edit_based' => 0,
                    'name' => 'Set Per Page Actions',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 12,
                    'action' => 'restore',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Restore Deleted Item From Any User',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 12,
                    'action' => 'undo',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'Undo Own Actions',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 13,
                    'action' => 'index',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'Create Repeater Row',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 14,
                    'action' => 'list',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Gallery List',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 14,
                    'action' => 'edit',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Edit Galleries',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 14,
                    'action' => 'update',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Run Gallery Upload Manager',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 14,
                    'action' => 'sort',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Sort Images',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 14,
                    'action' => 'upload',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Upload Images',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 14,
                    'action' => 'delete',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Delete Images',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 14,
                    'action' => 'caption',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Edit Captions',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 15,
                    'action' => 'list',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Forms List',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 15,
                    'action' => 'submissions',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'View Form Submissions',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 15,
                    'action' => 'csv',
                    'inherit' => 0,
                    'edit_based' => 1,
                    'name' => 'Export Form Submissions',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 16,
                    'action' => 'index',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Show Theme Management',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 16,
                    'action' => 'update',
                    'inherit' => 62,
                    'edit_based' => 0,
                    'name' => 'Theme Block Updater',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 16,
                    'action' => 'beacons',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Import Beacons',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 16,
                    'action' => 'beacons-update',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Update Beacon Blocks',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 9,
                    'action' => 'keys',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'Request browser API keys',
                    'about' => 'only keys with the string browser in can be called',
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 8,
                    'action' => 'page-state',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'Save page list state',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 8,
                    'action' => 'language',
                    'inherit' => -1,
                    'edit_based' => 0,
                    'name' => 'Change current language',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                ),
                array(
                    'controller_id' => 9,
                    'action' => 'upgrade',
                    'inherit' => 0,
                    'edit_based' => 0,
                    'name' => 'Upgrade CMS',
                    'about' => null,
                    'created_at' => $date,
                    'updated_at' => $date
                )
            ));

    }
241911
public function up()
    {
        Schema::create('hc_region_country', function (Blueprint $table) {
            $table->increments('count');
            $table->uuid('id')->unique();
            $table->datetime('created_at')->default(DB::raw('CURRENT_TIMESTAMP'));
            $table->datetime('updated_at')->default(DB::raw('CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP'));
            $table->datetime('deleted_at')->nullable();

            $table->uuid('flag_id')->nullable();
            $table->boolean('visible')->default(0);

            $table->foreign('flag_id')->references('id')->on('hc_resource');
        });
    }
128422
public function up()
    {
        Schema::create('netcore_category__categories', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('category_group_id');

            // Nested set columns.
            NestedSet::columns($table);

            // Simple icon. (select2)
            $table->string('icon')->nullable();

            $table->unsignedInteger('items_count')->default(0);
            $table->timestamps();
            $table->softDeletes();

            $table
                ->foreign('category_group_id', 'category::categories-category_group_foreign')
                ->references('id')
                ->on('netcore_category__category_groups')
                ->onDelete('CASCADE');
        });

        Schema::create('netcore_category__category_translations', function (Blueprint $table) {
            $table->increments('id');
            $table->unsignedInteger('category_id');

            $table->string('locale', 2)->index();
            $table->string('name');
            $table->string('slug')->index()->unique();
            $table->string('full_slug')->nullable()->index();
            $table->timestamps();

            $table
                ->foreign('category_id', 'category::category_translations-category_foreign')
                ->references('id')
                ->on('netcore_category__categories')
                ->onDelete('CASCADE');
        });
    }
1340998
public function up()
    {
        Schema::create($this->prefixCmsTable('users'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('email');
            $table->string('password');
            $table->text('permissions')->nullable();
            $table->timestamp('last_login')->nullable();
            $table->string('first_name')->nullable();
            $table->string('last_name')->nullable();
            $table->boolean('is_superadmin')->default(false);
            $table->nullableTimestamps();

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

        Schema::create($this->prefixCmsTable('activations'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->string('code');
            $table->boolean('completed')->default(0);
            $table->timestamp('completed_at')->nullable();
            $table->nullableTimestamps();

            $table->foreign('user_id', 'fk_' . $this->prefixCmsTable('activations_users1'))
                  ->references('id')->on($this->prefixCmsTable('users'))
                  ->onDelete('cascade');
        });

        Schema::create($this->prefixCmsTable('persistences'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->string('code');
            $table->nullableTimestamps();

            $table->unique('code');

            $table->foreign('user_id', 'fk_' . $this->prefixCmsTable('persistences_users1'))
                  ->references('id')->on($this->prefixCmsTable('users'))
                  ->onDelete('cascade');
        });

        Schema::create($this->prefixCmsTable('reminders'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned();
            $table->string('code');
            $table->boolean('completed')->default(0);
            $table->timestamp('completed_at')->nullable();
            $table->nullableTimestamps();

            $table->foreign('user_id', 'fk_' . $this->prefixCmsTable('reminders_users1'))
                  ->references('id')->on($this->prefixCmsTable('users'))
                  ->onDelete('cascade');
        });

        Schema::create($this->prefixCmsTable('roles'), function (Blueprint $table) {
            $table->increments('id');
            $table->string('slug');
            $table->string('name');
            $table->text('permissions')->nullable();
            $table->nullableTimestamps();

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

        Schema::create($this->prefixCmsTable('role_users'), function (Blueprint $table) {
            $table->integer('user_id')->unsigned();
            $table->integer('role_id')->unsigned();
            $table->nullableTimestamps();

            $table->primary(['user_id', 'role_id']);

            $table->foreign('user_id', 'fk_' . $this->prefixCmsTable('role_users_users1'))
                  ->references('id')->on($this->prefixCmsTable('users'))
                  ->onDelete('cascade');

            $table->foreign('role_id', 'fk_' . $this->prefixCmsTable('role_users_roles1'))
                  ->references('id')->on($this->prefixCmsTable('roles'))
                  ->onDelete('cascade');
        });

        Schema::create($this->prefixCmsTable('throttle'), function (Blueprint $table) {
            $table->increments('id');
            $table->integer('user_id')->unsigned()->nullable();
            $table->string('type');
            $table->string('ip')->nullable();
            $table->nullableTimestamps();

            $table->index('user_id');

            $table->foreign('user_id', 'fk_' . $this->prefixCmsTable('throttle_users1'))
                  ->references('id')->on($this->prefixCmsTable('users'))
                  ->onDelete('cascade');
        });
    }
1299746
public function up()
    {
        Schema::create('categories', function (Blueprint $table) {
            $table->increments('id');
            // nested sets fields
            $table->unsignedInteger('parent_id')->nullable()->index();
            $table->unsignedInteger('lft')->nullable()->index();
            $table->unsignedInteger('rgt')->nullable()->index();
            $table->unsignedInteger('depth')->nullable();

            $table->string('title');
            $table->string('alias')->index();
            $table->string('note')->nullable();
            $table->boolean('published')->default(false)->index();
            $table->boolean('authenticated')->default(false)->index();
            $table->integer('hits')->default(0);
            $table->mediumText('description')->nullable();
            $table->text('parameters')->nullable();

            $table->unsignedInteger('created_by')->nullable()->index();
            $table->unsignedInteger('updated_by')->nullable()->index();
            $table->timestamps();
        });
    }
104388
public function up()
    {
        if (!Schema::hasTable('users'))
        {
            Schema::create('users', function (Blueprint $table)
            {
                $table->engine = 'InnoDB';

                $table->increments('id')->unsigned();

                $table->string('name');
                $table->string('email')->unique();
                $table->string('password', 60);
                $table->rememberToken();
                $table->boolean('activated')->default(true);

                $table->dateTime('last_login')->nullable();
                $table->string('last_login_ip')->nullable();

                $table->boolean('enabled')->default(true);

                // Two-Factor Authentication Columns
                $table->boolean('two_factor_auth_enabled')->default(false);
                $table->string('phone_country_code')->nullable();
                $table->string('phone_number')->nullable();
                $table->string('sms_token')->nullable();
                $table->timestamp('sms_token_created_at')->nullable();

                // Token Based Login Authentication Columns ==> NEW PACKAGE FOR THIS!
                // https://github.com/lasallecms/lasallecms-l5-tokenbasedlogin-pkg
               // $table->string('login_token')->nullable();
               // $table->timestamp('login_token_created_at')->nullable();

                $table->timestamp('created_at');
                $table->integer('created_by')->unsigned()->default(0);

                $table->timestamp('updated_at');
                $table->integer('updated_by')->unsigned()->default(0);


                $table->timestamp('locked_at')->nullable();
                $table->integer('locked_by')->nullable();
            });
        }


        if (!Schema::hasTable('password_resets'))
        {
            Schema::create('password_resets', function (Blueprint $table)
            {
                $table->string('email')->index();
                $table->string('token')->index();
                $table->timestamp('created_at');
            });
        }


        if (!Schema::hasTable('groups'))
        {
            Schema::create('groups', function (Blueprint $table)
            {
                $table->engine = 'InnoDB';

                $table->increments('id')->unsigned();

                $table->string('title')->unique();
                $table->string('description');


                $table->boolean('enabled')->default(true);

                $table->timestamp('created_at');
                $table->integer('created_by')->unsigned();
                $table->foreign('created_by')->references('id')->on('users');

                $table->timestamp('updated_at');
                $table->integer('updated_by')->unsigned();
                $table->foreign('updated_by')->references('id')->on('users');

                $table->timestamp('locked_at')->nullable();
                $table->integer('locked_by')->nullable()->unsigned();
                $table->foreign('locked_by')->references('id')->on('users');
            });
        }


        if (!Schema::hasTable('user_group'))
        {
            Schema::create('user_group', function (Blueprint $table)
            {
                $table->engine = 'InnoDB';

                $table->increments('id')->unsigned();

                $table->integer('user_id')->unsigned()->index();
                $table->foreign('user_id')->references('id')->on('users')->onDelete('cascade');
                $table->integer('group_id')->unsigned()->index();
                $table->foreign('group_id')->references('id')->on('groups')->onDelete('cascade');
            });
        }
    }
1023801
public function up()
    {
        Schema::table($this->getTableName(), function (Blueprint $table) {
            $table->dropColumn('reserved');
            $table->index(['queue', 'reserved_at']);
        });

        Schema::table($this->getFailedTableName(), function (Blueprint $table) {
            $table->longText('exception')->nullable()->after('payload');
        });
    }
1288956
public function up()
    {
        // Create table for storing roles
        Schema::create('data_types', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name')->unique();
            $table->string('slug')->unique();
            $table->string('display_name_singular');
            $table->string('display_name_plural');
            $table->string('icon')->nullable();
            $table->string('model_name')->nullable();
            $table->string('description')->nullable();
            $table->boolean('generate_permissions')->default(false);
            $table->timestamps();
        });

        // Create table for storing roles
        Schema::create('data_rows', function (Blueprint $table) {
            $table->increments('id');
            $table->integer('data_type_id')->unsigned();
            $table->string('field');
            $table->string('type');
            $table->string('display_name')->nullable();
            $table->boolean('required')->default(false);
            $table->boolean('browse')->default(true);
            $table->boolean('read')->default(true);
            $table->boolean('edit')->default(true);
            $table->boolean('add')->default(true);
            $table->boolean('delete')->default(true);
            $table->text('details')->nullable();

            $table->foreign('data_type_id')->references('id')->on('data_types')
                ->onUpdate('cascade')->onDelete('cascade');
        });
    }
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();
        });
    }
477035
public function up()
    {
        //create user_custom
        Schema::create(
            'user_custom',
            function (Blueprint $t){
                $t->increments('id');
                $t->integer('user_id')->unsigned();
                $t->foreign('user_id')->references('id')->on('user')->onDelete('cascade');
                $t->string('name');
                $t->longText('value')->nullable();
                $t->timestamp('created_date')->nullable();
                $t->timestamp('last_modified_date')->useCurrent();
            }
        );
    }