Store_UI/admin/distz/api/migrations/20220209113751-create-order-details.js
2022-09-26 11:48:12 +05:30

54 lines
1.1 KiB
JavaScript

'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');
}
};