| 123456789101112131415 |
- module.exports = {
- version: 1.05,
- name: 'Inbound / Delivered',
- description: 'Removes `cartons`, refactors `scanned` to `inbound`.',
- up: async (queryInterface, Sequelize) => {
- await queryInterface.renameColumn('services', 'scanned', 'inbound')
- await queryInterface.renameColumn('workdays', 'cartons', 'inbound')
- await queryInterface.addColumn('workdays', 'delivered', Sequelize.INTEGER)
- await queryInterface.sequelize.query(`
- update services set inbound = cartons where cartons > 0
- `)
- await queryInterface.removeColumn('services', 'cartons')
- return 1.05
- }
- }
|