Fix script failure for regenerate-schema when switching branches
What does this MR do and why?
Fix the failure for regenerate-schema
script when switching between old branch and new branch.
See the slack help request at https://gitlab.slack.com/archives/C8HG8D9MY/p1697558577797609
Screenshots or screen recordings
Screenshots are required for UI changes, and strongly recommended for all other merge requests.
Before | After |
---|---|
How to set up and validate locally
-
List the local branches by ascending commit date
git branch --sort=committerdate
-
Pick the first old branch
git checkout OLD_BRANCH_NAME
-
Run
bin/rails db:reset RAILS_ENV=test scripts/regenerate-schema
-
Check out this branch
git checkout add-workaround-for-regenerate-schema
-
Run the script and see if it's successful or not
scripts/regenerate-schema
MR acceptance checklist
This checklist encourages us to confirm any changes have been analyzed to reduce risks in quality, performance, reliability, security, and maintainability.
-
I have evaluated the MR acceptance checklist for this MR.
Edited by Tianwen Chen