Apply unique key after assigning all of the values

This commit is contained in:
Dane Everitt 2020-04-10 15:54:28 -07:00
parent 2532a73425
commit c8a78c688f
No known key found for this signature in database
GPG key ID: EEA66103B3D71F53

View file

@ -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']);
});
}
/**