3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-03-16 06:11:49 +00:00
zeppelin/migrations/20180801235500_add_case_id_to_mutes.js

12 lines
410 B
JavaScript

exports.up = async function(knex, Promise) {
await knex.schema.table('mutes', table => {
table.integer('case_id').unsigned().nullable().defaultTo(null).after('user_id').references('id').inTable('cases').onDelete('SET NULL');
});
};
exports.down = async function(knex, Promise) {
await knex.schema.table('mutes', table => {
table.dropForeign('case_id');
table.dropColumn('case_id');
});
};