Update availibility migration and add basic crud
This commit is contained in:
@@ -1,6 +1,8 @@
|
||||
exports.up = (knex) => {
|
||||
return knex.schema.createTable('availibility', (table) => {
|
||||
table.increments('id').primary();
|
||||
|
||||
// Reference to participant composite primary key
|
||||
table.uuid('meeting_id').unsigned();
|
||||
table.integer('account_id').unsigned();
|
||||
table
|
||||
@@ -8,10 +10,10 @@ exports.up = (knex) => {
|
||||
.references(['account_id', 'meeting_id'])
|
||||
.on('participant')
|
||||
.onDelete('cascade');
|
||||
|
||||
table.integer('possible_date_id');
|
||||
table
|
||||
.integer('possible_date_id')
|
||||
.unsigned()
|
||||
.notNullable()
|
||||
.foreign('possible_date_id')
|
||||
.references('possible_date.id')
|
||||
.onDelete('cascade');
|
||||
table.boolean('preference').notNullable();
|
||||
|
||||
Reference in New Issue
Block a user