From 6de3100615e55f4cad24a9c122ee22b6e7391253 Mon Sep 17 00:00:00 2001 From: nessi Date: Sat, 14 Feb 2026 16:23:05 +0100 Subject: [PATCH] [NX-104 Issue] Filter out restrict/unrestrict lines in schema comparison. Updated the pg_dump commands in the migration-safety workflow to use `sed` for removing restrict/unrestrict lines. This ensures consistent schema comparison by ignoring irrelevant metadata. --- .github/workflows/migration-safety.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/migration-safety.yml b/.github/workflows/migration-safety.yml index 452a474..e34bba8 100644 --- a/.github/workflows/migration-safety.yml +++ b/.github/workflows/migration-safety.yml @@ -75,10 +75,12 @@ jobs: run: | cd backend alembic upgrade head - pg_dump -h postgres -p 5432 -U nexapg -d nexapg --schema-only --no-owner --no-privileges > /tmp/schema_head_before.sql + pg_dump -h postgres -p 5432 -U nexapg -d nexapg --schema-only --no-owner --no-privileges \ + | sed '/^\\restrict /d; /^\\unrestrict /d' > /tmp/schema_head_before.sql alembic downgrade -1 alembic upgrade head - pg_dump -h postgres -p 5432 -U nexapg -d nexapg --schema-only --no-owner --no-privileges > /tmp/schema_head_after.sql + pg_dump -h postgres -p 5432 -U nexapg -d nexapg --schema-only --no-owner --no-privileges \ + | sed '/^\\restrict /d; /^\\unrestrict /d' > /tmp/schema_head_after.sql diff -u /tmp/schema_head_before.sql /tmp/schema_head_after.sql