From c7fd09fb7886d1f0dba69aabe20d9e2868a30ce3 Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Thu, 26 Mar 2026 15:14:15 +0000 Subject: [PATCH] added file type and file source columns and enums --- src/app/db/schema/uploaded_files.ts | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/src/app/db/schema/uploaded_files.ts b/src/app/db/schema/uploaded_files.ts index 7d9abae..9f949fd 100644 --- a/src/app/db/schema/uploaded_files.ts +++ b/src/app/db/schema/uploaded_files.ts @@ -1,4 +1,22 @@ -import { bigint, bigserial, pgTable, text, timestamp } from "drizzle-orm/pg-core"; +import { bigint, bigserial, pgEnum, pgTable, text, timestamp } from "drizzle-orm/pg-core"; + +export const fileType = pgEnum("file_type", [ + "photo_pack", + "site_note", + "rd_sap_site_note", + "pas_2023_ventilation", + "pas_2023_condition", + "pas_significance", + "par_photo_pack", + "pas_2023_property", + "pas_2023_occupancy" +]); + +export const fileSource = pgEnum("file_source", [ + "pas hub", + "sharepoint", + "hubspot" +]); export const uploadedFiles = pgTable( "uploaded_files", @@ -11,6 +29,8 @@ export const uploadedFiles = pgTable( }).notNull(), landlordPropertyId: text("landlord_property_id"), uprn: bigint("uprn", { mode: "bigint" }), - hubspotListingId: bigint("hubspot_listing_id", { mode: "bigint" }) + hubspotListingId: bigint("hubspot_listing_id", { mode: "bigint" }), + fileType: fileType("file_type"), + source: fileSource("file_source") } ); \ No newline at end of file