mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
DB: Fixes for db 0.1.0 creation.
This commit is contained in:
1 parent
9ec080a107
commit
328f5656bf
11 files changed
+32
-21
No files matched your search
@@ -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)
|
||||
)
|
||||
""")
|
||||
|
||||
Reference in new issue
Block a user