22 lines
471 B
JavaScript
22 lines
471 B
JavaScript
|
'use strict';
|
||
|
|
||
|
module.exports = {
|
||
|
|
||
|
async up(knex) {
|
||
|
|
||
|
// Add the "scope" field to the "user" table
|
||
|
await knex.schema.table('user', (table) => {
|
||
|
table.dropColumn('scope'); // Remove the "role" field
|
||
|
|
||
|
});
|
||
|
},
|
||
|
|
||
|
async down(knex) {
|
||
|
|
||
|
// Revert the changes made in the "up" function
|
||
|
await knex.schema.table('user', (table) => {
|
||
|
table.string('scope').notNullable().defaultTo('user');
|
||
|
});
|
||
|
}
|
||
|
};
|