iut-hapi/lib/migrations/0-user.js

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