mirror of https://gitlab.com/pamhyr/pamhyr2
Geometry: Point: Optimize loading with indexing and update db to 0.2.5.
parent
229b3da2d1
commit
db7aad26fd
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ logger = logging.getLogger()
|
|||
|
||||
|
||||
class Study(SQLModel):
|
||||
_version = "0.2.4"
|
||||
_version = "0.2.5"
|
||||
|
||||
_sub_classes = [
|
||||
Scenario,
|
||||
|
|
|
|||
Loading…
Reference in New Issue