]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/tools/database_import.py
remove unused code
[nominatim.git] / nominatim / tools / database_import.py
index f6ebe90d0983588ccc101988f5085d6692f405a0..cb620d41fb8f31126fe69a622bf14130e38494d1 100644 (file)
@@ -75,6 +75,11 @@ def setup_database_skeleton(dsn: str, rouser: Optional[str] = None) -> None:
         with conn.cursor() as cur:
             cur.execute('CREATE EXTENSION IF NOT EXISTS hstore')
             cur.execute('CREATE EXTENSION IF NOT EXISTS postgis')
+
+            postgis_version = conn.postgis_version_tuple()
+            if postgis_version[0] >= 3:
+                cur.execute('CREATE EXTENSION IF NOT EXISTS postgis_raster')
+
         conn.commit()
 
         _require_version('PostGIS',