mirror of
https://github.com/wintercms/winter.git
synced 2024-06-28 05:33:29 +02:00
Use shorter index names
Fixes https://github.com/octobercms/install/issues/64
This commit is contained in:
parent
eb35c2bf3b
commit
67ba31b946
@ -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();
|
||||
|
@ -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();
|
||||
});
|
||||
|
@ -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');
|
||||
});
|
||||
}
|
||||
|
||||
|
@ -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');
|
||||
// });
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user