From 4c7cd49b759c30328b79fc53829d5587e85dc644 Mon Sep 17 00:00:00 2001 From: Ivica Matic Date: Mon, 13 Nov 2023 14:09:25 +0000 Subject: [PATCH] cicd: fixed command --- database.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/database.py b/database.py index a7c2eca..06fffa9 100644 --- a/database.py +++ b/database.py @@ -104,8 +104,11 @@ def store_collection_in_database( if __name__ == '__main__': plugin_enable_statement = sa.text("CREATE EXTENSION IF NOT EXISTS postgis;") - with engine.connect() as conn: + with engine.begin() as conn: conn.execute(plugin_enable_statement) logger.info("Enabled postgis extension") print("Enabled postgis extension") + # commit the changes + + base.metadata.create_all(engine)