From 7596fecd178eb1e7b476030522642cc4cb28ab2b Mon Sep 17 00:00:00 2001 From: Khalim Conn-Kowlessar Date: Mon, 31 Jul 2023 14:53:47 +0100 Subject: [PATCH] pushed status column to db --- src/app/db/migrations/meta/_journal.json | 7 +++++++ src/app/db/schema/property.ts | 4 +++- tsconfig.json | 4 ++-- 3 files changed, 12 insertions(+), 3 deletions(-) diff --git a/src/app/db/migrations/meta/_journal.json b/src/app/db/migrations/meta/_journal.json index 960a23c..dd8abb3 100644 --- a/src/app/db/migrations/meta/_journal.json +++ b/src/app/db/migrations/meta/_journal.json @@ -43,6 +43,13 @@ "when": 1690811484587, "tag": "0005_nice_enchantress", "breakpoints": true + }, + { + "idx": 6, + "version": "5", + "when": 1690811588997, + "tag": "0006_square_justin_hammer", + "breakpoints": true } ] } \ No newline at end of file diff --git a/src/app/db/schema/property.ts b/src/app/db/schema/property.ts index f14e360..b9422bf 100644 --- a/src/app/db/schema/property.ts +++ b/src/app/db/schema/property.ts @@ -8,7 +8,7 @@ import { integer, boolean, } from "drizzle-orm/pg-core"; -import { portfolio } from "./portfolio"; +import { portfolio, PortfolioStatus } from "./portfolio"; import { InferModel } from "drizzle-orm"; // This is a placeholder for the property schema @@ -73,6 +73,7 @@ export const propertyCreationStatusEnum = pgEnum( PropertyCreationStatus ); export const epcEnum = pgEnum("epc", Epc); +export const propertyStatusEnum = pgEnum("property_status", PortfolioStatus); export const property = pgTable("property", { id: serial("id").primaryKey(), @@ -81,6 +82,7 @@ export const property = pgTable("property", { .references(() => portfolio.id), creationStatus: propertyCreationStatusEnum("creation_status").notNull(), uprn: integer("uprn"), + status: propertyStatusEnum("status"), address: text("address"), postcode: text("postcode"), hasPreConditionReport: boolean("has_pre_condition_report"), diff --git a/tsconfig.json b/tsconfig.json index 7f10c94..6468155 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,8 +1,8 @@ { "compilerOptions": { "allowSyntheticDefaultImports": true, - // "target": "es5", - "target": "ESNext", + "target": "es5", + // "target": "ESNext", "lib": ["dom", "dom.iterable", "esnext"], "allowJs": true, "skipLibCheck": true,