23 lines
424 B
JavaScript
23 lines
424 B
JavaScript
'use strict';
|
|
|
|
module.exports = {
|
|
|
|
async up(knex) {
|
|
|
|
//update table User for role
|
|
await knex.schema.table('user', (table) => {
|
|
|
|
table.string('role').notNullable().defaultTo('user');
|
|
});
|
|
},
|
|
|
|
async down(knex) {
|
|
|
|
//update table User for role
|
|
await knex.schema.table('user', (table) => {
|
|
|
|
table.dropColumn('role');
|
|
});
|
|
}
|
|
};
|