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

+3 -4
View File
@@ -31,8 +31,7 @@ class PointXYZ(Point, SQLSubModel):
x: float = 0.0, y: float = 0.0, z: float = 0.0,
name: str = "", profile=None, status=None):
super(PointXYZ, self).__init__(
id=id
name=name, profile=profile, status=status
id=id, name=name, profile=profile, status=status
)
self._x = float(x)
@@ -51,11 +50,11 @@ class PointXYZ(Point, SQLSubModel):
z INTEGER NOT NULL,
profile INTEGER NOT NULL,
sl INTEGER,
{Scenario.create_db_add_scenario()},
{Scenario.create_db_add_scenario_fk()},
FOREIGN KEY(profile)
REFERENCES geometry_profileXYZ(pamhyr_id),
FOREIGN KEY(sl) REFERENCES sedimentary_layer(pamhyr_id),
{Scenario.create_db_add_scenario()},
{Scenario.create_db_add_scenario_fk()},
PRIMARY KEY(pamhyr_id, scenario)
)
""")