added is_active to recommendation materials

This commit is contained in:
Khalim Conn-Kowlessar 2023-08-11 12:23:16 +01:00
parent 55a46a9c2f
commit 6b6a588b07
5 changed files with 1259 additions and 2 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "recommendation_materials" ADD COLUMN "is_active" boolean NOT NULL;

File diff suppressed because it is too large Load diff

View file

@ -204,6 +204,13 @@
"when": 1691752123533,
"tag": "0028_premium_elektra",
"breakpoints": true
},
{
"idx": 29,
"version": "5",
"when": 1691752817584,
"tag": "0029_handy_the_liberteens",
"breakpoints": true
}
]
}

View file

@ -60,6 +60,9 @@ 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", {

View file

@ -1,8 +1,8 @@
{
"compilerOptions": {
"allowSyntheticDefaultImports": true,
// "target": "es5",
"target": "ESNext",
"target": "es5",
// "target": "ESNext",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,