Apply unique key after assigning all of the values
This commit is contained in:
parent
2532a73425
commit
c8a78c688f
1 changed files with 7 additions and 2 deletions
|
@ -23,8 +23,8 @@ class StoreNodeTokensAsEncryptedValue extends Migration
|
|||
});
|
||||
|
||||
Schema::table('nodes', function (Blueprint $table) {
|
||||
$table->char('uuid', 36)->after('id')->unique();
|
||||
$table->char('daemon_token_id', 16)->after('upload_size')->unique();
|
||||
$table->char('uuid', 36)->after('id');
|
||||
$table->char('daemon_token_id', 16)->after('upload_size');
|
||||
$table->renameColumn('daemonSecret', 'daemon_token');
|
||||
});
|
||||
|
||||
|
@ -45,6 +45,11 @@ class StoreNodeTokensAsEncryptedValue extends Migration
|
|||
]);
|
||||
}
|
||||
});
|
||||
|
||||
Schema::table('nodes', function (Blueprint $table) {
|
||||
$table->unique(['uuid']);
|
||||
$table->unique(['daemon_token_id']);
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue