diff --git a/CHANGES.md b/CHANGES.md index 84b68761..80409e64 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -1,3 +1,7 @@ +# 2024-10-12 (6.1.2) + +* Added pool_pre_ping=True to fix connection pool issues. + # 2024-10-01 (6.1.1) * Fixed crash in `schema permissions apply` for tables that don't have a sequence in the database. diff --git a/setup.cfg b/setup.cfg index ad1f934a..99b6542f 100644 --- a/setup.cfg +++ b/setup.cfg @@ -1,6 +1,6 @@ [metadata] name = amsterdam-schema-tools -version = 6.1.1 +version = 6.1.2 url = https://github.com/amsterdam/schema-tools license = Mozilla Public 2.0 author = Team Data Diensten, van het Dataplatform onder de Directie Digitale Voorzieningen (Gemeente Amsterdam) diff --git a/src/schematools/cli.py b/src/schematools/cli.py index 0df70da5..b3ca3174 100644 --- a/src/schematools/cli.py +++ b/src/schematools/cli.py @@ -112,7 +112,7 @@ def _get_engine(db_url: str, pg_schemas: list[str] | None = None) -> sqlalchemy.engine.Engine: """Initialize the SQLAlchemy engine, and report click errors.""" - kwargs = {} + kwargs = {"pool_pre_ping": True} if pg_schemas is not None: csearch_path = ",".join(pg_schemas + ["public"]) kwargs["connect_args"] = {"options": f"-csearch_path={csearch_path}"}