File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed
Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change 9494 echo "EOF" >> $GITHUB_OUTPUT
9595 - name : verify schema.sql is committed
9696 run : |
97+ # Save the original schema file
98+ cp migrations/schema-${{ env.PGMAJOR }}.sql migrations/schema-${{ env.PGMAJOR }}.sql.original
99+
100+ # Run dbmate-tool
97101 nix run github:supabase/postgres/${{ github.sha }}#dbmate-tool -- --version ${{ env.PGMAJOR }} --flake-url github:supabase/postgres/${{ github.sha }}
98- if ! git diff --exit-code --quiet migrations/schema-${{ env.PGMAJOR }}.sql; then
102+
103+ # Compare the files
104+ if ! cmp -s migrations/schema-${{ env.PGMAJOR }}.sql migrations/schema-${{ env.PGMAJOR }}.sql.original; then
99105 echo "Detected changes in schema.sql:"
100- git diff migrations/schema-${{ env.PGMAJOR }}.sql
106+ diff -u migrations/schema-${{ env.PGMAJOR }}.sql.original migrations/schema-${{ env.PGMAJOR }}.sql
101107 exit 1
102108 fi
You can’t perform that action at this time.
0 commit comments