pushed status column to db

This commit is contained in:
Khalim Conn-Kowlessar 2023-07-31 14:53:47 +01:00
parent 7e521db44e
commit 7596fecd17
3 changed files with 12 additions and 3 deletions

View file

@ -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
}
]
}

View file

@ -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"),

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,