Add CRUD operations for participant
This commit is contained in:
@@ -1,18 +1,16 @@
|
||||
exports.up = (knex) => {
|
||||
return knex.schema.createTable('participant', (table) => {
|
||||
table.increments('id').primary();
|
||||
table.integer('account_id').unsigned();
|
||||
table.uuid('meeting_id').unsigned();
|
||||
table
|
||||
.integer('account_id')
|
||||
.unsigned()
|
||||
.notNullable()
|
||||
.references('account.id')
|
||||
.onDelete('cascade');
|
||||
.foreign('meeting_id')
|
||||
.references('meeting.id')
|
||||
.onDelete('cascade');
|
||||
table
|
||||
.uuid('meeting_id')
|
||||
.unsigned()
|
||||
.notNullable()
|
||||
.references('meeting.id')
|
||||
.onDelete('cascade');
|
||||
.foreign('account_id')
|
||||
.references('account.id')
|
||||
.onDelete('cascade');
|
||||
table.primary(['meeting_id','account_id']);
|
||||
table.time('earliest_time');
|
||||
table.time('latest_time');
|
||||
table.boolean('quorum');
|
||||
|
||||
@@ -1,11 +1,12 @@
|
||||
exports.up = (knex) => {
|
||||
return knex.schema.createTable('availibility', (table) => {
|
||||
table.increments('id').primary();
|
||||
table.uuid('meeting_id').unsigned();
|
||||
table.integer('account_id').unsigned();
|
||||
table
|
||||
.integer('participant_id')
|
||||
.unsigned()
|
||||
.notNullable()
|
||||
.references('participant.id')
|
||||
.foreign(['account_id', 'meeting_id'])
|
||||
.references(['account_id', 'meeting_id'])
|
||||
.on('participant')
|
||||
.onDelete('cascade');
|
||||
table
|
||||
.integer('possible_date_id')
|
||||
|
||||
Reference in New Issue
Block a user