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 94
94
echo "EOF" >> $GITHUB_OUTPUT
95
95
- name : verify schema.sql is committed
96
96
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
97
101
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
99
105
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
101
107
exit 1
102
108
fi
You can’t perform that action at this time.
0 commit comments