alembic
alembic copied to clipboard
[Fixes #1761] Add opt-in autogenerate support for check constraints
Description
This adds an opt-in compare_check_constraints configuration option for autogenerate, allowing Alembic to detect check constraint differences between SQLAlchemy models and the database.
Changes:
- New config option compare_check_constraints
- Check constraint comparison logic
- Check constraint signature class
- Renderer for CreateCheckConstraintOp
- Comparison method
- Type stub
- Tests covering add, remove, match, disabled, unnamed, invalid names, enum filtering, and bound parameters
Checklist
This pull request is:
- [ ] A documentation / typographical error fix
- Good to go, no issue or tests are needed
- [ ] 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.
- [x] 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!