modify bookingChangeIncidents table

This commit is contained in:
Bilal Catic
2019-07-09 14:17:36 +02:00
parent 129e6e78d6
commit edefaf7cf9
2 changed files with 25 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.renameColumn('bookingChangeIncidents', 'resourceId', 'oldResourceId');
},
down: (queryInterface, Sequelize) => {
return queryInterface.renameColumn('bookingChangeIncidents', 'oldResourceId', 'resourceId');
}
};

View File

@@ -0,0 +1,14 @@
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.addColumn('bookingChangeIncidents', 'newResourceId', {
type: Sequelize.TEXT,
after: 'oldResourceId',
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.removeColumn('bookingChangeIncidents', 'newResourceId');
}
};