Skip to content

Commit 3b80d83

Browse files
improvement(ci): reject pooled (pgbouncer) database urls for migrations
1 parent bbe722b commit 3b80d83

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/migrations.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,12 @@ jobs:
6262
echo "ERROR: no database URL secret resolved for environment '${ENVIRONMENT}'" >&2
6363
exit 1
6464
fi
65+
case "$DATABASE_URL" in
66+
*:6432*)
67+
echo "ERROR: '${ENVIRONMENT}' database URL targets PgBouncer (port 6432); migrations need a direct connection (port 5432) — session advisory locks and SET don't survive transaction pooling" >&2
68+
exit 1
69+
;;
70+
esac
6571
6672
if [ "${ENVIRONMENT}" = "dev" ]; then
6773
echo "Dev environment — pushing schema directly (db:push)"

0 commit comments

Comments
 (0)