mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-07-12 13:28:55 +00:00
Merge pull request #242 from Hestia-Homes/feature/new-epc-tables
New EPC tables: make property_id and portfolio_id foreign keys nullable
This commit is contained in:
commit
9df415c80d
4 changed files with 8627 additions and 2 deletions
2
src/app/db/migrations/0186_equal_baron_zemo.sql
Normal file
2
src/app/db/migrations/0186_equal_baron_zemo.sql
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
ALTER TABLE "epc_property" ALTER COLUMN "property_id" DROP NOT NULL;--> statement-breakpoint
|
||||
ALTER TABLE "epc_property" ALTER COLUMN "portfolio_id" DROP NOT NULL;
|
||||
8616
src/app/db/migrations/meta/0186_snapshot.json
Normal file
8616
src/app/db/migrations/meta/0186_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -1303,6 +1303,13 @@
|
|||
"when": 1777026653433,
|
||||
"tag": "0185_slimy_mindworm",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 186,
|
||||
"version": "7",
|
||||
"when": 1777028605680,
|
||||
"tag": "0186_equal_baron_zemo",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue