mailtrain/setup/knex/migrations/20170617123450_create_user_name.js

14 lines
404 B
JavaScript
Raw Normal View History

2017-08-11 06:51:30 +00:00
exports.up = (knex, Promise) => (async() => {
await knex.schema.table('users', table => {
// name and password can be null in case of LDAP login
table.string('name');
table.string('password').alter();
2017-08-11 06:51:30 +00:00
});
await knex('users').where('id', 1 /* Admin user id */).update({
name: 'Administrator'
2017-08-11 06:51:30 +00:00
});
})();
2017-08-11 06:51:30 +00:00
exports.down = (knex, Promise) => (async() => {
})();