Change fk constraint in possible_date migration
This commit is contained in:
parent
6ce64b5e95
commit
b7b7dbbc73
@ -3,14 +3,14 @@ exports.up = (knex) => {
|
|||||||
table.integer('account_id').unsigned();
|
table.integer('account_id').unsigned();
|
||||||
table.uuid('meeting_id').unsigned();
|
table.uuid('meeting_id').unsigned();
|
||||||
table
|
table
|
||||||
.foreign('meeting_id')
|
.foreign('meeting_id')
|
||||||
.references('meeting.id')
|
.references('meeting.id')
|
||||||
.onDelete('cascade');
|
.onDelete('cascade');
|
||||||
table
|
table
|
||||||
.foreign('account_id')
|
.foreign('account_id')
|
||||||
.references('account.id')
|
.references('account.id')
|
||||||
.onDelete('cascade');
|
.onDelete('cascade');
|
||||||
table.primary(['meeting_id','account_id']);
|
table.primary(['meeting_id', 'account_id']);
|
||||||
table.time('earliest_time');
|
table.time('earliest_time');
|
||||||
table.time('latest_time');
|
table.time('latest_time');
|
||||||
table.boolean('quorum');
|
table.boolean('quorum');
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
exports.up = (knex) => {
|
exports.up = (knex) => {
|
||||||
return knex.schema.createTable('possible_date', (table) => {
|
return knex.schema.createTable('possible_date', (table) => {
|
||||||
table.increments('id').primary();
|
table.increments('id').primary();
|
||||||
|
table.uuid('meeting_id').unsigned().notNullable();
|
||||||
table
|
table
|
||||||
.uuid('meeting_id')
|
.foreign('meeting_id')
|
||||||
.unsigned()
|
|
||||||
.notNullable()
|
|
||||||
.references('meeting.id')
|
.references('meeting.id')
|
||||||
.onDelete('cascade');
|
.onDelete('cascade');
|
||||||
table.date('possible_date').notNullable();
|
table.date('possible_date').notNullable();
|
||||||
|
Loading…
Reference in New Issue
Block a user