alembic
alembic copied to clipboard
Add --splice support to merge command
This fixes: #1712
Description
I noticed that no one was actively working on this issue, so I went ahead and implemented support for the --splice option in the merge command.
This change allows merge to operate with non-head revisions by disabling the head-only validation, consistent with the behavior of --splice in revision.
Key points included in this PR:
- Adds --splice support to alembic merge, allowing non-head revisions to be used as merge bases.
- Updates the help text to reflect the new behavior.
- Adds test coverage to validate both the failure case (splice=False) and the successful merge case (splice=True) using non-head revisions.
Let me know if further adjustments or additional tests would be helpful.
Checklist
This pull request is:
- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [x] A short code fix
- please include the issue number, and create an issue if none exists, which must include a complete example of the issue. one line code fixes without an issue and demonstration will not be accepted.
- Please include:
Fixes: #<issue number>in the commit message - please include tests. one line code fixes without tests will not be accepted.
- [ ] A new feature implementation
- please include the issue number, and create an issue if none exists, which must include a complete example of how the feature would look.
- Please include:
Fixes: #<issue number>in the commit message - please include tests.
Have a nice day!
New Gerrit review created for change 52bf8a6ca4ad881597a6a4dd15eefa1433a4a259: https://gerrit.sqlalchemy.org/c/sqlalchemy/alembic/+/6496