chore(migrations/remove_key_column_in_roles): use arrow functions

This commit is contained in:
Ali BARIN
2024-09-05 12:13:33 +00:00
parent 5591f6ccc9
commit 10a25b82e0

View File

@@ -5,7 +5,7 @@ export async function up(knex) {
}
export async function down(knex) {
await knex.schema.alterTable('roles', function (table) {
await knex.schema.alterTable('roles', (table) => {
table.string('key');
});
@@ -13,7 +13,7 @@ export async function down(knex) {
key: knex.raw('LOWER(??)', ['name']),
});
return await knex.schema.alterTable('roles', function (table) {
return await knex.schema.alterTable('roles', (table) => {
table.string('key').notNullable().alter();
});
}