feat: write migration to make roles unique by key
This commit is contained in:
@@ -0,0 +1,11 @@
|
|||||||
|
export async function up(knex) {
|
||||||
|
return await knex.schema.alterTable('roles', (table) => {
|
||||||
|
table.unique('key');
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
export async function down(knex) {
|
||||||
|
return await knex.schema.alterTable('roles', function (table) {
|
||||||
|
table.dropUnique('key');
|
||||||
|
});
|
||||||
|
}
|
Reference in New Issue
Block a user