Store_UI/admin/distz/api/migrations/20220209113751-create-order-details.js

54 lines
1.1 KiB
JavaScript
Raw Normal View History

2022-09-26 06:18:12 +00:00
'use strict';
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('orderDetails', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
orderId: {
type: Sequelize.INTEGER
},
medicineId: {
type: Sequelize.INTEGER
},
quantity: {
type: Sequelize.INTEGER
},
amount: {
type: Sequelize.DOUBLE
},
curdiscount: {
type: Sequelize.DOUBLE
},
discount: {
type: Sequelize.DOUBLE
},
total: {
type: Sequelize.DOUBLE
},
status: {
type: Sequelize.INTEGER
},
createdBy: {
type: Sequelize.INTEGER
},
updatedBy: {
type: Sequelize.INTEGER
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable('orderDetails');
}
};