Built motion from commit 16cc8f1.|1.0.14
[motion.git] / server / migrations / 20170317095253-queue_strategy.js
1 'use strict';
2
3 module.exports = {
4   up: function(queryInterface, Sequelize) {
5     queryInterface.sequelize.query("UPDATE chat_queues SET strategy = 'roundrobin' WHERE strategy = 'rrmemory'")
6       .then(function() {
7         console.log('Strategy updated for chat_queues');
8       })
9       .catch(function(err) {
10         console.error(err);
11       });
12
13     queryInterface.sequelize.query("UPDATE fax_queues SET strategy = 'roundrobin' WHERE strategy = 'rrmemory'")
14       .then(function() {
15         console.log('Strategy updated for fax_queues');
16       })
17       .catch(function(err) {
18         console.error(err);
19       });
20
21     queryInterface.sequelize.query("UPDATE mail_queues SET strategy = 'roundrobin' WHERE strategy = 'rrmemory'")
22       .then(function() {
23         console.log('Strategy updated for mail_queues');
24       })
25       .catch(function(err) {
26         console.error(err);
27       });
28
29     queryInterface.sequelize.query("UPDATE openchannel_queues SET strategy = 'roundrobin' WHERE strategy = 'rrmemory'")
30       .then(function() {
31         console.log('Strategy updated for openchannel_queues');
32       })
33       .catch(function(err) {
34         console.error(err);
35       });
36
37     queryInterface.sequelize.query("UPDATE sms_queues SET strategy = 'roundrobin' WHERE strategy = 'rrmemory'")
38       .then(function() {
39         console.log('Strategy updated for sms_queues');
40       })
41       .catch(function(err) {
42         console.error(err);
43       });
44   },
45   down: function(queryInterface, Sequelize) {
46
47   }
48 };