Fixed column names and the report
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
return queryInterface.addColumn('unlockedIncidents', 'unlockTimestamp', {
|
||||
type: Sequelize.DATE,
|
||||
after: 'bookingEnd'
|
||||
});
|
||||
},
|
||||
|
||||
down: (queryInterface, Sequelize) => {
|
||||
return queryInterface.removeColumn('unlockedIncidents', 'unlockTimestamp');
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
up: (queryInterface, Sequelize) => {
|
||||
return queryInterface.sequelize.transaction((t) => {
|
||||
return Promise.all([
|
||||
queryInterface.addColumn('unscheduledIncidents', 'unlockTimestamp', {
|
||||
type: Sequelize.DATE,
|
||||
after: 'bookingEnd'
|
||||
}),
|
||||
queryInterface.addColumn('unscheduledIncidents', 'lockTimestamp', {
|
||||
type: Sequelize.DATE,
|
||||
after: 'unlockTimestamp'
|
||||
})
|
||||
]);
|
||||
});
|
||||
},
|
||||
|
||||
down: (queryInterface, Sequelize) => {
|
||||
return queryInterface.sequelize.transaction((t) => {
|
||||
return Promise.all([
|
||||
queryInterface.removeColumn('unscheduledIncidents', 'lockTimestamp'),
|
||||
queryInterface.removeColumn('unscheduledIncidents', 'unlockTimestamp')
|
||||
]);
|
||||
});
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user