-
Notifications
You must be signed in to change notification settings - Fork 235
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
feat: add ability to ignore version mismatch check #1323
feat: add ability to ignore version mismatch check #1323
Conversation
Are you sure this is desired behaviour because the order of migrations often matters. In cases like these, I would expect the CI checks to fail on the newer PR because the base branch is outdated. I would suggest the following workflow instead:
After that, the CI check in step 1 should pass. The rebased PR can then be merged to main branch and its migrations can be pushed. |
@sweatybridge I agree that often order of migration matters. But I have 4 developers, and frequently they are working on things that are not related. So on every PR I need to manually update timestamp on each migration because sometimes we have migrations that cannot be merged until fronted are prepared. That's why I added this feature as an additional flag, not as a default behavior. |
Pull Request Test Coverage Report for Build 5713199287
💛 - Coveralls |
I've updated this PR to handle the following situations separately:
This should continue to throw an error because it means the local files are outdated.
This is a common scenario faced by multiple devs working on separate features as described in this issue. The newly added
|
What kind of change does this PR introduce?
It's currently a problem when you merge two PRs that include migrations, but firstly, you will merge newer, then you will get an error that the version is a mismatch.
What is the current behavior?
Mismatch error on db push command.
What is the new behavior?
With
--ignore-version-mismatch
flag, all missing migrations on remote will be pushed. It is not recommended to use that on a production project.Additional context
This feature is designed to be used on internal projects. On production, I would recommend not to use
--ignore-version-mismatch
flag.