From b7c3793a66614dab3ca6ac476f15b407c873b8d0 Mon Sep 17 00:00:00 2001 From: Pierre-Antoine Rouby Date: Fri, 4 Sep 2026 11:29:02 +0200 Subject: [PATCH] Geometry: Point: Fix index creation. --- src/Model/Geometry/PointXYZ.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/Model/Geometry/PointXYZ.py b/src/Model/Geometry/PointXYZ.py index 08e1f0c3..73d4fcd5 100644 --- a/src/Model/Geometry/PointXYZ.py +++ b/src/Model/Geometry/PointXYZ.py @@ -95,12 +95,11 @@ 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);" - ) + # Try to create index at each update + execute( + "CREATE INDEX IF NOT EXISTS idx_point " + + "ON geometry_pointXYZ(profile, scenario);" + ) return cls._update_submodel(execute, version, data)