Built motion from commit c56b56e.|0.0.125
[motion.git] / server / migrations / 20160629120423-mail.js
index a3e915d..7dd0569 100644 (file)
@@ -1 +1,39 @@
-var _0xb706=["\x75\x73\x65\x20\x73\x74\x72\x69\x63\x74","\x65\x78\x70\x6F\x72\x74\x73","\x6D\x61\x69\x6C\x5F\x72\x6F\x6F\x6D\x73","\x77\x61\x69\x74\x69\x6E\x67","\x42\x4F\x4F\x4C\x45\x41\x4E","\x61\x64\x64\x43\x6F\x6C\x75\x6D\x6E","\x63\x68\x61\x74\x5F\x72\x6F\x6F\x6D\x73","\x73\x6D\x73\x5F\x72\x6F\x6F\x6D\x73","\x66\x61\x78\x5F\x72\x6F\x6F\x6D\x73","\x72\x65\x70\x6F\x72\x74\x5F\x6D\x61\x69\x6C\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x75\x6E\x6D\x61\x6E\x61\x67\x65\x64","\x74\x69\x6D\x65\x6F\x75\x74","\x72\x65\x6E\x61\x6D\x65\x43\x6F\x6C\x75\x6D\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x63\x68\x61\x74\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x73\x6D\x73\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x72\x65\x70\x6F\x72\x74\x5F\x66\x61\x78\x5F\x73\x65\x73\x73\x69\x6F\x6E","\x72\x65\x6D\x6F\x76\x65\x43\x6F\x6C\x75\x6D\x6E"];_0xb706[0];module[_0xb706[1]]= {up:function(_0x67b0x1,_0x67b0x2){_0x67b0x1[_0xb706[5]](_0xb706[2],_0xb706[3],{type:_0x67b0x2[_0xb706[4]],defaultValue:false});_0x67b0x1[_0xb706[5]](_0xb706[6],_0xb706[3],{type:_0x67b0x2[_0xb706[4]],defaultValue:false});_0x67b0x1[_0xb706[5]](_0xb706[7],_0xb706[3],{type:_0x67b0x2[_0xb706[4]],defaultValue:false});_0x67b0x1[_0xb706[5]](_0xb706[8],_0xb706[3],{type:_0x67b0x2[_0xb706[4]],defaultValue:false});_0x67b0x1[_0xb706[12]](_0xb706[9],_0xb706[10],_0xb706[11]);_0x67b0x1[_0xb706[12]](_0xb706[13],_0xb706[10],_0xb706[11]);_0x67b0x1[_0xb706[12]](_0xb706[14],_0xb706[10],_0xb706[11]);_0x67b0x1[_0xb706[12]](_0xb706[15],_0xb706[10],_0xb706[11])},down:function(_0x67b0x1,_0x67b0x2){_0x67b0x1[_0xb706[12]](_0xb706[15],_0xb706[11],_0xb706[10]);_0x67b0x1[_0xb706[12]](_0xb706[14],_0xb706[11],_0xb706[10]);_0x67b0x1[_0xb706[12]](_0xb706[13],_0xb706[11],_0xb706[10]);_0x67b0x1[_0xb706[12]](_0xb706[9],_0xb706[11],_0xb706[10]);_0x67b0x1[_0xb706[16]](_0xb706[8],_0xb706[3]);_0x67b0x1[_0xb706[16]](_0xb706[7],_0xb706[3]);_0x67b0x1[_0xb706[16]](_0xb706[6],_0xb706[3]);_0x67b0x1[_0xb706[16]](_0xb706[2],_0xb706[3])}}
\ No newline at end of file
+'use strict';
+
+module.exports = {
+  up: function(queryInterface, Sequelize) {
+    queryInterface.addColumn('mail_rooms', 'waiting', {
+      type: Sequelize.BOOLEAN,
+      defaultValue: false
+    });
+    queryInterface.addColumn('chat_rooms', 'waiting', {
+      type: Sequelize.BOOLEAN,
+      defaultValue: false
+    });
+    queryInterface.addColumn('sms_rooms', 'waiting', {
+      type: Sequelize.BOOLEAN,
+      defaultValue: false
+    });
+    queryInterface.addColumn('fax_rooms', 'waiting', {
+      type: Sequelize.BOOLEAN,
+      defaultValue: false
+    });
+
+    queryInterface.renameColumn('report_mail_session', 'unmanaged', 'timeout');
+    queryInterface.renameColumn('report_chat_session', 'unmanaged', 'timeout');
+    queryInterface.renameColumn('report_sms_session', 'unmanaged', 'timeout');
+    queryInterface.renameColumn('report_fax_session', 'unmanaged', 'timeout');
+  },
+
+  down: function(queryInterface, Sequelize) {
+    queryInterface.renameColumn('report_fax_session', 'timeout', 'unmanaged');
+    queryInterface.renameColumn('report_sms_session', 'timeout', 'unmanaged');
+    queryInterface.renameColumn('report_chat_session', 'timeout', 'unmanaged');
+    queryInterface.renameColumn('report_mail_session', 'timeout', 'unmanaged');
+
+    queryInterface.removeColumn('fax_rooms', 'waiting');
+    queryInterface.removeColumn('sms_rooms', 'waiting');
+    queryInterface.removeColumn('chat_rooms', 'waiting');
+    queryInterface.removeColumn('mail_rooms', 'waiting');
+  }
+};