rmoving isActive from recMaterials

This commit is contained in:
Khalim Conn-Kowlessar 2023-08-11 12:30:29 +01:00
parent 6b6a588b07
commit 7e14b9cffc
4 changed files with 1250 additions and 3 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "recommendation_materials" DROP COLUMN IF EXISTS "is_active";

File diff suppressed because it is too large Load diff

View file

@ -211,6 +211,13 @@
"when": 1691752817584,
"tag": "0029_handy_the_liberteens",
"breakpoints": true
},
{
"idx": 30,
"version": "5",
"when": 1691753400997,
"tag": "0030_special_hydra",
"breakpoints": true
}
]
}

View file

@ -36,6 +36,8 @@ export const recommendation = pgTable("recommendation", {
type: text("type").notNull(),
description: text("description").notNull(),
estimatedCost: real("estimated_cost"),
// default will indicate whether a mtaterial is currently being used in a recommendation and we will use this boolean to switch
// between materials in the UI and switch off all materials entirely
default: boolean("default").notNull(),
startingUValue: real("starting_u_value"),
newUValue: real("new_u_value"),
@ -60,9 +62,6 @@ export const recommendationMaterials = pgTable("recommendation_materials", {
.notNull()
.references(() => material.id),
createdAt: timestamp("created_at").notNull().defaultNow(),
// isActive will indicate whether a mtaterial is currently being used in a recommendation and we will use this boolean to switch
// between materials in the UI and switch off all materials entirely
isActive: boolean("is_active").notNull(),
});
export const plan = pgTable("plan", {