fix migrations drop unique on update_app_users and update_settings unique

This commit is contained in:
Jérémy Munsch 2023-08-22 09:19:11 +02:00
parent c4ba52bbac
commit ccb6c2c38f
No known key found for this signature in database
GPG key ID: 18361AF3BFEC0FEC
2 changed files with 2 additions and 2 deletions

View file

@ -33,7 +33,7 @@ class UpdateAppUsersTable extends Migration
// * OTHERS
Schema::table('app_users', function (Blueprint $table) {
$table->dropUnique('app_users_email_unique');
$table->dropUnique('email');
$table->unique(['email']);
$table->renameColumn('surname', 'lastname');
$table->renameColumn('activated', 'status');

View file

@ -20,7 +20,7 @@ class UpdateSettingsTable extends Migration
DB::statement('ALTER TABLE `settings` CHANGE `updated_at` `updated_at` datetime DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP');
Schema::table('settings', function (Blueprint $table) {
$table->dropUnique('settings_key_unique');
$table->dropUnique('data_key_unique');
$table->unique(['key']);
$table->text('value')->nullable()->default(null)->change();
$table->dateTime('created_at')->default('CURRENT_TIMESTAMP')->nullable()->change();