Converting cost column in database to json

This commit is contained in:
Khalim Conn-Kowlessar 2023-08-14 12:13:24 +01:00
parent 539ce98ae1
commit a0f2fbb126
6 changed files with 2503 additions and 1 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "material" DROP COLUMN IF EXISTS "cost";

View file

@ -0,0 +1 @@
ALTER TABLE "material" ADD COLUMN "cost" json;

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -225,6 +225,20 @@
"when": 1691759536397,
"tag": "0031_complete_menace",
"breakpoints": true
},
{
"idx": 32,
"version": "5",
"when": 1692011562531,
"tag": "0032_productive_vapor",
"breakpoints": true
},
{
"idx": 33,
"version": "5",
"when": 1692011574566,
"tag": "0033_overconfident_kat_farrell",
"breakpoints": true
}
]
}

View file

@ -41,7 +41,7 @@ export const material = pgTable("material", {
description: text("description").notNull(),
depths: json("depths").$type<number[]>(),
depth_unit: depthUnitEnum("depth_unit"),
cost: real("cost"),
cost: json("cost").$type<number[]>(),
costUnit: costUnitEnum("cost_unit"),
rValuePerMm: real("r_value_per_mm"),
rValueUnit: rValueUnitEnum("r_value_unit"),