mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 20:35:02 +00:00
Rename ModActions to Cases
This commit is contained in:
parent
62dfc80a0e
commit
e6f296381e
7 changed files with 154 additions and 152 deletions
21
migrations/20180712020400_rename_mod_actions_to_cases.js
Normal file
21
migrations/20180712020400_rename_mod_actions_to_cases.js
Normal file
|
@ -0,0 +1,21 @@
|
|||
exports.up = async function(knex) {
|
||||
await knex.schema.renameTable('mod_actions', 'cases');
|
||||
await knex.schema.renameTable('mod_action_notes', 'case_notes');
|
||||
await knex.schema.table('cases', table => {
|
||||
table.renameColumn('action_type', 'type');
|
||||
});
|
||||
await knex.schema.table('case_notes', table => {
|
||||
table.renameColumn('mod_action_id', 'case_id');
|
||||
});
|
||||
};
|
||||
|
||||
exports.down = async function(knex) {
|
||||
await knex.schema.table('cases', table => {
|
||||
table.renameColumn('type', 'action_type');
|
||||
});
|
||||
await knex.schema.table('case_notes', table => {
|
||||
table.renameColumn('case_id', 'mod_action_id');
|
||||
});
|
||||
await knex.schema.renameTable('cases', 'mod_actions');
|
||||
await knex.schema.renameTable('case_notes', 'mod_action_notes');
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue