From fead8582c60099c97c1e1b32a7c9cc7cf884bbed Mon Sep 17 00:00:00 2001 From: Daniel Roth Date: Fri, 24 Apr 2026 11:03:01 +0000 Subject: [PATCH] make property_id and portfolio_id foreign keys nullable --- src/app/db/schema/property.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/db/schema/property.ts b/src/app/db/schema/property.ts index c7d8dd1a..132721bc 100644 --- a/src/app/db/schema/property.ts +++ b/src/app/db/schema/property.ts @@ -416,10 +416,10 @@ export const epcProperty = pgTable( { id: bigserial("id", { mode: "bigint" }).primaryKey(), propertyId: bigint("property_id", { mode: "bigint" }) - .notNull() + // .notNull() .references(() => property.id), portfolioId: bigint("portfolio_id", { mode: "bigint" }) - .notNull() + // .notNull() .references(() => portfolio.id), // Identity / admin