work in progress on custom fields

This commit is contained in:
Tomas Bures 2017-08-11 08:51:30 +02:00
parent 361af18384
commit 86fce404a9
29 changed files with 1088 additions and 198 deletions

View file

@ -1,13 +1,14 @@
exports.up = function(knex, Promise) {
return knex.schema.table('users', table => {
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();
})
.then(() => knex('users').where('id', 1 /* Admin user id */).update({
name: 'Administrator'
}));
};
});
exports.down = function(knex, Promise) {
};
await knex('users').where('id', 1 /* Admin user id */).update({
name: 'Administrator'
});
})();
exports.down = (knex, Promise) => (async() => {
})();