DB: Fixes for db 0.1.0 creation.

This commit is contained in:
Pierre-Antoine Rouby committed 2024-07-29 16:28:46 +02:00
1 parent 9ec080a107
commit 328f5656bf
11 files changed
+32 -21

No files matched your search

+2 -1
View File
@@ -17,6 +17,7 @@
# -*- coding: utf-8 -*-
from Model.Tools.PamhyrDB import SQLSubModel
from Model.Scenario import Scenario
class BHSValue(SQLSubModel):
@@ -43,9 +44,9 @@ class BHSValue(SQLSubModel):
type TEXT NOT NULL,
value TEXT NOT NULL,
bhs INTEGER,
FOREIGN KEY(bhs) REFERENCES hydraulic_structures_basic(id),
{Scenario.create_db_add_scenario()},
{Scenario.create_db_add_scenario_fk()},
FOREIGN KEY(bhs) REFERENCES hydraulic_structures_basic(id),
PRIMARY KEY(pamhyr_id, scenario)
)
""")