exports.up = (knex) => { return knex.schema.createTable('availability', (table) => { table.increments('id').primary(); table.uuid('participant_id').notNullable(); table .foreign('participant_id') .references('participant.id') .onDelete('cascade'); table.integer('possible_date_id').notNullable(); table .foreign('possible_date_id') .references('possible_date.id') .onDelete('cascade'); table.boolean('preference').notNullable(); table.datetime('start_time').notNullable(); table.datetime('end_time').notNullable(); table.timestamps(true, true); }); }; exports.down = (knex) => { return knex.schema.dropTable('availability'); };