File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,7 +206,15 @@ jobs:
206206 bash <<'BASH'
207207 set -euo pipefail
208208
209- db_container_line=$(docker ps --format '{{.ID}} {{.Names}} {{.Image}}' | awk '$3 ~ /supabase\/postgres/ {print $1" "$2; exit}')
209+ find_db_container() {
210+ docker ps --format '{{.ID}} {{.Names}} {{.Image}}' | awk '$3 ~ /^supabase\/postgres(:|$)/ {print $1" "$2; exit}'
211+ }
212+
213+ db_container_line=$(find_db_container)
214+ if [ -z "${db_container_line}" ]; then
215+ db_container_line=$(docker ps --format '{{.ID}} {{.Names}} {{.Image}}' | awk '$2 ~ /_db_/ {print $1" "$2; exit}')
216+ fi
217+
210218 if [ -z "${db_container_line}" ]; then
211219 echo "Supabase database container not found; cannot verify migrations" >&2
212220 exit 1
@@ -220,7 +228,7 @@ jobs:
220228 missing=0
221229
222230 for table in "${required_tables[@]}"; do
223- if ! docker exec "${container_id}" psql -U postgres -d postgres -At -c "select to_regclass('public.${table}');" | grep -q "public.${table}"; then
231+ if ! docker exec -e PGPASSWORD=postgres "${container_id}" psql -U postgres -d postgres -At -c "select to_regclass('public.${table}');" | grep -q "public.${table}"; then
224232 echo "❌ Missing table public.${table}"
225233 missing=1
226234 else
You can’t perform that action at this time.
0 commit comments