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