%PDF- %PDF-
Direktori : /home/opti/workflow/src/migrations/ |
Current File : /home/opti/workflow/src/migrations/20190406170139-create-item-movement.js |
'use strict'; module.exports = { up: (queryInterface, Sequelize) => { return queryInterface.createTable('ItemMovements', { id: { allowNull: false, autoIncrement: true, primaryKey: true, type: Sequelize.INTEGER }, uuid: { type: Sequelize.UUID }, itemId: { type: Sequelize.INTEGER }, orgId: { type: Sequelize.INTEGER }, current: { type: Sequelize.BOOLEAN }, pieces: { type: Sequelize.INTEGER }, location: { type: Sequelize.ENUM, values: ['Store', 'Region', 'Branch', 'Company Structure', 'Employee'] }, receiverId: { type: Sequelize.INTEGER }, moverId: { type: Sequelize.INTEGER }, moverType: { type: Sequelize.ENUM, values: ['Store', 'Region', 'Branch', 'Company Structure', 'Employee'] }, createdAt: { allowNull: false, type: Sequelize.DATE }, updatedAt: { allowNull: false, type: Sequelize.DATE }, createdBy: { type: Sequelize.INTEGER }, remarks: { type: Sequelize.STRING }, }); }, down: (queryInterface, Sequelize) => { return queryInterface.dropTable('ItemMovements'); } };