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.boolean('quorum'); table.boolean('mandatory'); table.boolean('host').notNullable(); table.boolean('answered').notNullable(); table.timestamps(true, true); }); }; exports.down = (knex) => { return knex.schema.dropTable('participant'); };