make property_id and portfolio_id foreign keys nullable

This commit is contained in:
Daniel Roth 2026-04-24 11:03:01 +00:00
parent 0ba5d65d7f
commit fead8582c6

View file

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