28 lines
719 B
JavaScript
28 lines
719 B
JavaScript
exports.up = (knex) => {
|
|
return knex.schema.createTable('participant', (table) => {
|
|
table.integer('account_id').unsigned();
|
|
table.uuid('meeting_id').unsigned();
|
|
table
|
|
.foreign('meeting_id')
|
|
.references('meeting.id')
|
|
.onDelete('cascade');
|
|
table
|
|
.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');
|
|
table.boolean('mandatory');
|
|
table.boolean('host');
|
|
table.boolean('answered');
|
|
table.string('timezone').notNullable();
|
|
table.timestamps(true, true);
|
|
});
|
|
};
|
|
|
|
exports.down = (knex) => {
|
|
return knex.schema.dropTable('participant');
|
|
};
|