Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check table existance for source that is non-INTERLIS #106

Merged
merged 2 commits into from
Oct 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/continuous_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/gpkg_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()

Expand Down
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/mssql_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -737,6 +737,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()
Expand Down
3 changes: 3 additions & 0 deletions modelbaker/dbconnector/pg_connector.py
Original file line number Diff line number Diff line change
Expand Up @@ -844,6 +844,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)
Expand Down
4 changes: 2 additions & 2 deletions scripts/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Loading