Skip to content

Commit 677d657

Browse files
authored
Skip schema validation in CI (#2313)
1 parent eaa817c commit 677d657

File tree

1 file changed

+28
-26
lines changed

1 file changed

+28
-26
lines changed

.circleci/new_branch.yml

Lines changed: 28 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -129,33 +129,35 @@ jobs:
129129
command: |
130130
cd services/database
131131
npm install
132-
- run:
133-
name: Validate schema is in sync with migrations
134-
command: |
135-
cd services/database
136-
# Initialize git submodules
137-
git submodule update --init
138-
# Apply migrations using npm script
139-
npm run migrate:up
140-
# Force dump in case problems were ignored
141-
npx dbmate dump
132+
# Skipping the following tests because postgres 16.10 introduced changes to pg_dump
133+
# which prevents us to have consistent dumps.
134+
# - run:
135+
# name: Validate schema is in sync with migrations
136+
# command: |
137+
# cd services/database
138+
# # Initialize git submodules
139+
# git submodule update --init
140+
# # Apply migrations using npm script
141+
# npm run migrate:up
142+
# # Force dump in case problems were ignored
143+
# npx dbmate dump
142144

143-
# Check if the schema file has changed
144-
if git diff --exit-code sourcify-database.sql; then
145-
echo "✅ Schema validation passed - sourcify-database.sql is in sync with migrations"
146-
else
147-
echo "❌ Schema file is out of sync with migrations!"
148-
echo ""
149-
echo "The sourcify-database.sql file does not match what the migrations produce."
150-
echo ""
151-
echo "To fix this, run a postgres instance locally."
152-
echo "Then apply the migrations to a clean database:"
153-
echo " cd services/database && npm run migrate:up"
154-
echo ""
155-
echo "Then include the updated schema in your commit:"
156-
echo " git add sourcify-database.sql && git commit -m 'Update schema'"
157-
exit 1
158-
fi
145+
# # Check if the schema file has changed
146+
# if git diff --exit-code sourcify-database.sql; then
147+
# echo "✅ Schema validation passed - sourcify-database.sql is in sync with migrations"
148+
# else
149+
# echo "❌ Schema file is out of sync with migrations!"
150+
# echo ""
151+
# echo "The sourcify-database.sql file does not match what the migrations produce."
152+
# echo ""
153+
# echo "To fix this, run a postgres instance locally."
154+
# echo "Then apply the migrations to a clean database:"
155+
# echo " cd services/database && npm run migrate:up"
156+
# echo ""
157+
# echo "Then include the updated schema in your commit:"
158+
# echo " git add sourcify-database.sql && git commit -m 'Update schema'"
159+
# exit 1
160+
# fi
159161
- run:
160162
name: Test that down migrations work
161163
command: |

0 commit comments

Comments
 (0)