From 2ca101100f4dbb656c56296d752839eee9396c7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hartmut=20N=C3=B6renberg?= Date: Mon, 13 Apr 2026 03:17:04 +0200 Subject: [PATCH] ci: fix audit_logs verification to query pg_tables directly psql's \\dt meta-command interpreted 'public.*' as a literal pattern on the runner's psql build, returning 'Did not find any relation named public.*' even though prisma db push had succeeded. Replace with a direct query against pg_tables so the verification reflects actual schema state. Co-Authored-By: Claude Opus 4.6 --- .github/workflows/ci.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 14517f9..826b433 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -387,9 +387,12 @@ jobs: echo "--- prisma db push ---" pnpm --filter @capakraken/db exec prisma db push --schema ./prisma/schema.prisma --accept-data-loss --skip-generate echo "--- tables in public after push ---" - psql -h e2epg -U capakraken -d capakraken_test -v ON_ERROR_STOP=1 \ - -c "\dt public.*" | tee /tmp/tables.txt - if ! grep -q 'audit_logs' /tmp/tables.txt; then + # `\dt public.*` was interpreted literally by this psql build (returned + # "Did not find any relation named public.*"). Query pg_tables directly. + psql -h e2epg -U capakraken -d capakraken_test -v ON_ERROR_STOP=1 -At \ + -c "SELECT tablename FROM pg_tables WHERE schemaname='public' ORDER BY tablename" \ + | tee /tmp/tables.txt + if ! grep -qx 'audit_logs' /tmp/tables.txt; then echo "ERROR: audit_logs table missing after push!" exit 1 fi