diff --git a/.github/workflows/continuous_integration.yml b/.github/workflows/continuous_integration.yml index 6f8f928..5f261d9 100644 --- a/.github/workflows/continuous_integration.yml +++ b/.github/workflows/continuous_integration.yml @@ -30,9 +30,9 @@ jobs: run: | sudo ./scripts/package_pip_packages.sh - name: Test on QGIS with PG 13 - run: docker-compose -f .docker/docker-compose.gh.yml run -e "PGHOST=postgres13" qgis /usr/src/.docker/run-docker-tests.sh + run: docker compose -f .docker/docker-compose.gh.yml run -e "PGHOST=postgres13" qgis /usr/src/.docker/run-docker-tests.sh - name: Test on QGIS with PG 15 - run: docker-compose -f .docker/docker-compose.gh.yml run -e "PGHOST=postgres15" qgis /usr/src/.docker/run-docker-tests.sh + run: docker compose -f .docker/docker-compose.gh.yml run -e "PGHOST=postgres15" qgis /usr/src/.docker/run-docker-tests.sh release: name: Build and publish Python 🐍 distributions 📦 to PyPI and TestPyPI diff --git a/modelbaker/dbconnector/gpkg_connector.py b/modelbaker/dbconnector/gpkg_connector.py index c549c8c..bc7d429 100644 --- a/modelbaker/dbconnector/gpkg_connector.py +++ b/modelbaker/dbconnector/gpkg_connector.py @@ -653,6 +653,9 @@ def get_attrili_attrdb_mapping_by_owner(self, owners): return cursor def get_models(self): + if not self._table_exists("t_ili2db_trafo"): + return {} + # Get MODELS cursor = self.conn.cursor() diff --git a/modelbaker/dbconnector/mssql_connector.py b/modelbaker/dbconnector/mssql_connector.py index 85808bf..c8f7fb5 100644 --- a/modelbaker/dbconnector/mssql_connector.py +++ b/modelbaker/dbconnector/mssql_connector.py @@ -738,6 +738,9 @@ def get_iliname_dbname_mapping(self, sqlnames=list()): return result def get_models(self): + if not self._table_exists("t_ili2db_trafo"): + return {} + # Get MODELS if self.schema: cur = self.conn.cursor() diff --git a/modelbaker/dbconnector/pg_connector.py b/modelbaker/dbconnector/pg_connector.py index 78d0517..eebc15a 100644 --- a/modelbaker/dbconnector/pg_connector.py +++ b/modelbaker/dbconnector/pg_connector.py @@ -845,6 +845,9 @@ def get_attrili_attrdb_mapping_by_owner(self, owners): return {} def get_models(self): + if not self._table_exists("t_ili2db_trafo"): + return {} + # Get MODELS if self.schema: cursor = self.conn.cursor(cursor_factory=psycopg2.extras.DictCursor) diff --git a/scripts/run-tests.sh b/scripts/run-tests.sh index 515ffb5..b01ee77 100755 --- a/scripts/run-tests.sh +++ b/scripts/run-tests.sh @@ -15,5 +15,5 @@ fi cd $(dirname $0)/.. export GITHUB_WORKSPACE=$PWD # only for local execution -docker-compose -f .docker/docker-compose.gh.yml run qgis /usr/src/.docker/run-docker-tests.sh $@ -docker-compose -f .docker/docker-compose.gh.yml rm -s -f +docker compose -f .docker/docker-compose.gh.yml run qgis /usr/src/.docker/run-docker-tests.sh $@ +docker compose -f .docker/docker-compose.gh.yml rm -s -f