New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ExcludeConstraint breaks autogenerate #412
Comments
Changes by dataradiant (@dataradiant):
|
1 similar comment
Changes by dataradiant (@dataradiant):
|
Michael Bayer (@zzzeek) wrote: so yes that should at the very least degrade gracefully as it does for other things that are non-detectable, then the PG impl can also deliver an implementation for this. that this blocks autogenerate makes it more urgent but I don't have time to get to it until next week, hope this is not blocking you. |
Changes by Michael Bayer (@zzzeek):
|
Michael Bayer (@zzzeek) wrote: this is on render, not compare. |
Michael Bayer (@zzzeek) wrote: Add ExcludeConstraint support for Postgresql Add full support for Postgresql add_exclude_constraint(). Additionally, gracefully degrade if a given constraint Fixes: #412 → 01db038 |
Changes by Michael Bayer (@zzzeek):
|
Migrated issue, originally created by dataradiant (@dataradiant)
Using
ExcludeConstraint()
seems to break alembic's autogenerate.I'm specifying the constraint in my
__table_args__
as:ExcludeConstraint(("destination_id", "="), ("route_id", "="), ("timerange","&&"), name="uq_msgtime", using="gist")
The error is
ValueError: no dispatch function for object: ExcludeConstraint()
. https://bitbucket.org/zzzeek/alembic/src/377198f274edad3220a9485c30827251f848fdac/alembic/util/langhelpers.py?at=master&fileviewer=file-view-default#langhelpers.py-300It seems that the
_registry
attribute of theDispatcher
object doesn't contain the required tuple, specifically one that has any of the classes in theExcludeConstraint
mro.The text was updated successfully, but these errors were encountered: