mailtrain/setup/knex/migrations/20170617123450_create_user_name.js
Tomas Bures 89c9615592 WiP on permissions
Doesn't run. This commit is just to backup the changes.
2017-07-26 22:42:05 +03:00

13 lines
No EOL
390 B
JavaScript

exports.up = function(knex, Promise) {
return knex.schema.table('users', table => {
// name and password can be null in case of LDAP login
table.string('name');
table.string('password').alter();
})
.then(() => knex('users').where('id', 1 /* Admin user id */).update({
name: 'Administrator'
}));
};
exports.down = function(knex, Promise) {
};