aboutsummaryrefslogtreecommitdiffstats
path: root/db/normalized/users.js
blob: dd239f24e34d0e2411bedc5ef91585ddaac2d210 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
export const up = function(knex) {
  return knex.schema.createTable('users'<
span class="nx">increments('id').unsigned().primary(); t.string('uuid').notNull().index(); t.string('username').notNull().index(); t.string('password').notNull(); t.string('email').nullable().index(); t.string('phone').nullable(); t.enum('access', ['Anonymous', 'Registered', 'Admin']).notNull().defaultTo('Anonymous'); t.timestamps(); }) }; export const down = function(knex) { return knex.schema.dropTable('users'); };