Test reversibility of migrations #220

Merged
bustikiller merged 35 commits from test-rollbacks into main 2025-01-25 09:43:43 +00:00
Showing only changes of commit 44590e6889 - Show all commits

View File

@ -35,7 +35,8 @@ jobs:
echo "Trying again" echo "Trying again"
done done
- run: | - run: |
migrations_added=$(git diff ${{ github.base_ref }} --name-only db/migrate/ | wc -l) git fetch
migrations_added=$(git diff origin/${{ github.base_ref }} --name-only db/migrate/ | wc -l)
echo "Migrations added: $migrations_added" echo "Migrations added: $migrations_added"
bundle exec rake db:schema:load db:migrate:status db:migrate:redo bundle exec rake db:schema:load db:migrate:status db:migrate:redo
git diff --exit-code db/schema.rb git diff --exit-code db/schema.rb