feat: write migration to make roles unique by key

This commit is contained in:
Ali BARIN
2024-09-03 13:55:28 +00:00
parent 2709491d59
commit 64ebdce1b2

View File

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