Skip to content

Commit d33834a

Browse files
author
Vikas Agarwal
committed
Added quantity field for project estimations as we need to store quantity for API add ons as of new API smart forms
1 parent cb1f7d7 commit d33834a

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
--
2+
-- UPDATE EXISTING TABLES:
3+
-- project_estimations:
4+
-- added column `quantity`
5+
6+
--
7+
-- product_templates
8+
9+
-- Add new column
10+
ALTER TABLE project_estimations ADD COLUMN "quantity" int DEFAULT 1;

src/models/projectEstimation.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ module.exports = function defineProjectHistory(sequelize, DataTypes) {
66
buildingBlockKey: { type: DataTypes.STRING, allowNull: false },
77
conditions: { type: DataTypes.STRING, allowNull: false },
88
price: { type: DataTypes.DOUBLE, allowNull: false },
9+
quantity: { type: DataTypes.INTEGER, allowNull: true },
910
minTime: { type: DataTypes.INTEGER, allowNull: false },
1011
maxTime: { type: DataTypes.INTEGER, allowNull: false },
1112
metadata: { type: DataTypes.JSON, allowNull: false, defaultValue: {} },

0 commit comments

Comments
 (0)