backend/data/migrations/20200502193352_possible_date.js

17 lines
428 B
JavaScript
Raw Normal View History

2020-05-02 19:06:34 +00:00
exports.up = (knex) => {
return knex.schema.createTable('possible_date', (table) => {
table.increments('id').primary();
table.uuid('meeting_id').unsigned().notNullable();
2020-05-02 19:06:34 +00:00
table
.foreign('meeting_id')
2020-05-02 19:06:34 +00:00
.references('meeting.id')
.onDelete('cascade');
table.date('possible_date').notNullable();
table.timestamps(true, true);
});
};
exports.down = (knex) => {
return knex.schema.dropTable('possible_date');
};