09193efe44db393cc1519d845d96185429c7e3a9
[motion.git] / server / migrations / 20160512182519-report_fax_and_sms.js
1 'use strict';
2
3 module.exports = {
4   up: function(queryInterface, Sequelize) {
5     queryInterface.addColumn('report_fax_room', 'status', {
6       type: Sequelize.ENUM('NEW', 'OPEN', 'CLOSED', 'UNMANAGED'),
7       defaultValue: 'NEW'
8     });
9     queryInterface.addColumn('report_sms_room', 'status', {
10       type: Sequelize.ENUM('NEW', 'OPEN', 'CLOSED', 'UNMANAGED'),
11       defaultValue: 'NEW'
12     });
13     queryInterface.addColumn('report_fax_room_history', 'status', {
14       type: Sequelize.ENUM('NEW', 'OPEN', 'CLOSED', 'UNMANAGED'),
15       defaultValue: 'NEW'
16     });
17     queryInterface.addColumn('report_sms_room_history', 'status', {
18       type: Sequelize.ENUM('NEW', 'OPEN', 'CLOSED', 'UNMANAGED'),
19       defaultValue: 'NEW'
20     });
21   },
22
23   down: function(queryInterface, Sequelize) {
24     queryInterface.removeColumn('report_fax_room', 'status');
25     queryInterface.removeColumn('report_sms_room', 'status');
26     queryInterface.removeColumn('report_fax_room_history', 'status');
27     queryInterface.removeColumn('report_sms_room_history', 'status');
28   }
29 };