Geometry: Point: Optimize loading with indexing and update db to 0.2.5.

scenarios
Pierre-Antoine 2026-05-28 16:59:24 +02:00
parent 229b3da2d1
commit db7aad26fd
2 changed files with 13 additions and 1 deletions

View File

@ -66,6 +66,11 @@ class PointXYZ(Point):
)
""")
execute(
"CREATE INDEX idx_point " +
"ON geometry_pointXYZ(profile, scenario);"
)
return cls._create_submodel(execute)
@classmethod
@ -90,6 +95,13 @@ class PointXYZ(Point):
"ADD COLUMN deleted BOOLEAN NOT NULL DEFAULT FALSE"
)
if major == "0" and minor == "2":
if int(release) < 5:
execute(
"CREATE INDEX idx_point " +
"ON geometry_pointXYZ(profile, scenario);"
)
return cls._update_submodel(execute, version, data)
@classmethod

View File

@ -46,7 +46,7 @@ logger = logging.getLogger()
class Study(SQLModel):
_version = "0.2.4"
_version = "0.2.5"
_sub_classes = [
Scenario,