diff --git a/modules/backend/database/migrations/2013_10_01_000001_Db_Backend_Users.php b/modules/backend/database/migrations/2013_10_01_000001_Db_Backend_Users.php index cce09225c..daf54ca93 100644 --- a/modules/backend/database/migrations/2013_10_01_000001_Db_Backend_Users.php +++ b/modules/backend/database/migrations/2013_10_01_000001_Db_Backend_Users.php @@ -12,12 +12,12 @@ class DbBackendUsers extends Migration $table->increments('id'); $table->string('first_name')->nullable(); $table->string('last_name')->nullable(); - $table->string('login')->unique()->index(); - $table->string('email')->unique(); + $table->string('login')->unique('login_unique')->index('login_index'); + $table->string('email')->unique('email_unique'); $table->string('password'); - $table->string('activation_code')->nullable()->index(); + $table->string('activation_code')->nullable()->index('act_code_index'); $table->string('persist_code')->nullable(); - $table->string('reset_password_code')->nullable()->index(); + $table->string('reset_password_code')->nullable()->index('reset_code_index'); $table->text('permissions')->nullable(); $table->boolean('is_activated')->default(0); $table->timestamp('activated_at')->nullable(); diff --git a/modules/backend/database/migrations/2013_10_01_000002_Db_Backend_User_Groups.php b/modules/backend/database/migrations/2013_10_01_000002_Db_Backend_User_Groups.php index d9f05faf6..8d348421e 100644 --- a/modules/backend/database/migrations/2013_10_01_000002_Db_Backend_User_Groups.php +++ b/modules/backend/database/migrations/2013_10_01_000002_Db_Backend_User_Groups.php @@ -10,7 +10,7 @@ class DbBackendUserGroups extends Migration Schema::create('backend_user_groups', function ($table) { $table->engine = 'InnoDB'; $table->increments('id'); - $table->string('name')->unique(); + $table->string('name')->unique('name_unique'); $table->text('permissions')->nullable(); $table->timestamps(); }); diff --git a/modules/backend/database/migrations/2013_10_01_000003_Db_Backend_Users_Groups.php b/modules/backend/database/migrations/2013_10_01_000003_Db_Backend_Users_Groups.php index 4e786e7cf..be8cc22ad 100644 --- a/modules/backend/database/migrations/2013_10_01_000003_Db_Backend_Users_Groups.php +++ b/modules/backend/database/migrations/2013_10_01_000003_Db_Backend_Users_Groups.php @@ -11,7 +11,7 @@ class DbBackendUsersGroups extends Migration $table->engine = 'InnoDB'; $table->integer('user_id')->unsigned(); $table->integer('user_group_id')->unsigned(); - $table->primary(array('user_id', 'user_group_id')); + $table->primary(['user_id', 'user_group_id'], 'user_group'); }); } diff --git a/modules/backend/database/migrations/2014_10_01_000007_Db_Backend_Add_Description_Field.php b/modules/backend/database/migrations/2014_10_01_000007_Db_Backend_Add_Description_Field.php index 2c82b7ff5..0dc143fce 100644 --- a/modules/backend/database/migrations/2014_10_01_000007_Db_Backend_Add_Description_Field.php +++ b/modules/backend/database/migrations/2014_10_01_000007_Db_Backend_Add_Description_Field.php @@ -8,7 +8,7 @@ class DbBackendAddDescriptionField extends Migration public function up() { Schema::table('backend_user_groups', function (Blueprint $table) { - $table->string('code')->nullable()->index(); + $table->string('code')->nullable()->index('code_index'); $table->text('description')->nullable(); $table->boolean('is_new_user_default')->default(false); }); @@ -16,10 +16,10 @@ class DbBackendAddDescriptionField extends Migration public function down() { - Schema::table('backend_user_groups', function (Blueprint $table) { - $table->dropColumn('code'); - $table->dropColumn('description'); - $table->dropColumn('is_new_user_default'); - }); + // Schema::table('backend_user_groups', function (Blueprint $table) { + // $table->dropColumn('code'); + // $table->dropColumn('description'); + // $table->dropColumn('is_new_user_default'); + // }); } }