mirror of
https://gitlab.com/pamhyr/pamhyr2.git
synced 2026-10-30 03:20:41 +01:00
Geometry: Point: Optimize loading with indexing and update db to 0.2.5.
This commit is contained in:
1 parent
229b3da2d1
commit
db7aad26fd
2 files changed
+13
-1
No files matched your search
@@ -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
|
||||
|
||||
+1
-1
@@ -46,7 +46,7 @@ logger = logging.getLogger()
|
||||
|
||||
|
||||
class Study(SQLModel):
|
||||
_version = "0.2.4"
|
||||
_version = "0.2.5"
|
||||
|
||||
_sub_classes = [
|
||||
Scenario,
|
||||
|
||||
Reference in new issue
Block a user