mirror of
https://github.com/Hestia-Homes/assessment-model.git
synced 2026-06-08 11:37:25 +00:00
fixed foreign key
This commit is contained in:
parent
28e50160f5
commit
ea3b65998a
5 changed files with 2955 additions and 3 deletions
7
src/app/db/migrations/0095_sloppy_ikaris.sql
Normal file
7
src/app/db/migrations/0095_sloppy_ikaris.sql
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ALTER TABLE "energy_assessment_documents" DROP CONSTRAINT "energy_assessment_documents_scenario_id_energy_assessments_id_fk";
|
||||
--> statement-breakpoint
|
||||
DO $$ BEGIN
|
||||
ALTER TABLE "energy_assessment_documents" ADD CONSTRAINT "energy_assessment_documents_scenario_id_energy_assessment_scenarios_id_fk" FOREIGN KEY ("scenario_id") REFERENCES "energy_assessment_scenarios"("id") ON DELETE no action ON UPDATE no action;
|
||||
EXCEPTION
|
||||
WHEN duplicate_object THEN null;
|
||||
END $$;
|
||||
2938
src/app/db/migrations/meta/0095_snapshot.json
Normal file
2938
src/app/db/migrations/meta/0095_snapshot.json
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -666,6 +666,13 @@
|
|||
"when": 1725461633948,
|
||||
"tag": "0094_old_forge",
|
||||
"breakpoints": true
|
||||
},
|
||||
{
|
||||
"idx": 95,
|
||||
"version": "5",
|
||||
"when": 1725474928372,
|
||||
"tag": "0095_sloppy_ikaris",
|
||||
"breakpoints": true
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -189,7 +189,7 @@ export const energyAssessmentDocuments = pgTable(
|
|||
.defaultNow(),
|
||||
scenarioId: bigint("scenario_id", {
|
||||
mode: "bigint",
|
||||
}).references(() => energyAssessment.id),
|
||||
}).references(() => energyAssessmentScenarios.id),
|
||||
}
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"compilerOptions": {
|
||||
"allowSyntheticDefaultImports": true,
|
||||
"target": "es5",
|
||||
// "target": "ESNext",
|
||||
// "target": "es5",
|
||||
"target": "ESNext",
|
||||
"lib": ["dom", "dom.iterable", "esnext"],
|
||||
"allowJs": true,
|
||||
"skipLibCheck": true,
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue