This commit is contained in:
ntr
2018-09-13 18:52:27 +10:00
parent 407c62fc8a
commit 0e0cd0fdcd
8 changed files with 31 additions and 13 deletions
@@ -1,8 +1,13 @@
exports.up = async knex => {
return knex.schema.createTable('users', table => {
table.uuid('id').primary();
table.text('name');
});
return knex.schema.createTable('users', table => {
table.uuid('id').primary();
table.string('name', 42).notNullable().unique();
table.string('password').notNullable();
table.string('token', 64).notNullable();
table.index('name');
table.index('id');
});
};
exports.down = async () => {};