mailtrain/setup/knex/migrations/20170617123450_create_user_name.js
2017-08-11 08:51:30 +02:00

14 lines
No EOL
404 B
JavaScript

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();
});
await knex('users').where('id', 1 /* Admin user id */).update({
name: 'Administrator'
});
})();
exports.down = (knex, Promise) => (async() => {
})();