Built motion from commit 1333b3551.|1.0.38
[motion.git] / server / migrations / 20160524085528-chat_websites.js
1 'use strict';
2
3 module.exports = {
4   up: function(queryInterface, Sequelize) {
5     queryInterface.addColumn('chat_websites', 'ListId', Sequelize.INTEGER);
6     queryInterface.sequelize.query("ALTER TABLE chat_websites ADD CONSTRAINT `chat_websites_ibfk_1` FOREIGN KEY (`ListId`) REFERENCES `cm_lists` (`id`) ON DELETE SET NULL ON UPDATE CASCADE");
7   },
8
9   down: function(queryInterface, Sequelize) {
10     queryInterface.sequelize.query('ALTER TABLE chat_websites DROP FOREIGN KEY `chat_websites_1`;');
11     queryInterface.removeColumn('chat_websites', 'ListId');
12   }
13 };