make column unique

This commit is contained in:
Daniel Roth 2026-04-28 16:11:33 +00:00
parent b696f823a4
commit f7b35f04a8
4 changed files with 8652 additions and 0 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "epc_property" ADD CONSTRAINT "epc_property_uploaded_file_id_unique" UNIQUE("uploaded_file_id");

File diff suppressed because it is too large Load diff

View file

@ -1331,6 +1331,13 @@
"when": 1777392468614,
"tag": "0189_high_leech",
"breakpoints": true
},
{
"idx": 190,
"version": "7",
"when": 1777392681924,
"tag": "0190_worried_drax",
"breakpoints": true
}
]
}

View file

@ -423,6 +423,7 @@ export const epcProperty = pgTable(
// .notNull()
.references(() => portfolio.id),
uploadedFileId: bigint("uploaded_file_id", { mode: "bigint" })
.unique()
.references(() => uploadedFiles.id),
// Identity / admin