blob: 67762ff16b6cf1e2c60a4d8fc35238104edc6ce5 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
exports.up = function(knex) {
return Promise.all([
knex.schema.dropTableIfExists('waiting_list'),
knex.schema.createTable('waiting_list', function(t) {
t.increments('id').unsigned().primary();
t.string('email').notNull();
t.string('phone').notNull();
t.enu('status', ['pending', 'activated', 'expired', 'cancelled']).notNull();
t.integer('user_id').nullable();
t.foreign('user_id').references('users.id');
t.text('notes').nullable();
t.timestamps();
})
])
}
exports.down = function(knex) {
return knex.schema.dropTable('waiting_list');
}
|