Built motion from commit c56b56e.|0.0.125
[motion.git] / server / migrations / 20160506181017-voice_extensions.js
1 'use strict';
2
3 module.exports = {
4   up: function(queryInterface, Sequelize) {
5     queryInterface.addColumn('voice_extensions', 'FaxAccountId', Sequelize.INTEGER);
6     queryInterface.sequelize.query(
7       "ALTER TABLE voice_extensions ADD CONSTRAINT `voice_extensions_ibfk_6` FOREIGN KEY (`FaxAccountId`) REFERENCES `fax_accounts` (`id`) ON DELETE SET NULL ON UPDATE CASCADE;");
8   },
9
10   down: function(queryInterface, Sequelize) {
11     queryInterface.sequelize.query('ALTER TABLE voice_extensions DROP FOREIGN KEY `voice_extensions_ibfk_6`;');
12     queryInterface.removeColumn('voice_extensions', 'FaxAccountId');
13   }
14 };