mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
add new fk column uploaded_file_id
This commit is contained in:
parent
d6610f7327
commit
b696f823a4
4 changed files with 8647 additions and 0 deletions
2
src/app/db/migrations/0189_high_leech.sql
Normal file
2
src/app/db/migrations/0189_high_leech.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE "epc_property" ADD COLUMN "uploaded_file_id" bigint;--> statement-breakpoint
|
||||
ALTER TABLE "epc_property" ADD CONSTRAINT "epc_property_uploaded_file_id_uploaded_files_id_fk" FOREIGN KEY ("uploaded_file_id") REFERENCES "public"."uploaded_files"("id") ON DELETE no action ON UPDATE no action;
|
||||
8635
src/app/db/migrations/meta/0189_snapshot.json
Normal file
8635
src/app/db/migrations/meta/0189_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1324,6 +1324,13 @@
|
|||
"when": 1777364161220,
|
||||
"tag": "0188_wild_morph",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 189,
|
||||
"version": "7",
|
||||
"when": 1777392468614,
|
||||
"tag": "0189_high_leech",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -15,6 +15,7 @@ import { portfolio, PortfolioStatus } from "./portfolio";
|
|||
import { InferModel } from "drizzle-orm";
|
||||
import { materialTypeEnum } from "./materials";
|
||||
import { sql } from "drizzle-orm";
|
||||
import { uploadedFiles } from "./uploaded_files";
|
||||
|
||||
// This is a placeholder for the property schema
|
||||
export interface PropertyMeta {
|
||||
|
|
@ -421,6 +422,8 @@ export const epcProperty = pgTable(
|
|||
portfolioId: bigint("portfolio_id", { mode: "bigint" })
|
||||
// .notNull()
|
||||
.references(() => portfolio.id),
|
||||
uploadedFileId: bigint("uploaded_file_id", { mode: "bigint" })
|
||||
.references(() => uploadedFiles.id),
|
||||
|
||||
// Identity / admin
|
||||
uprn: bigint("uprn", { mode: "bigint" }),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue