You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
An autogenerated migration adding a column using a TypeDecorator type and a with_variant() override loses the variants when using SQLAlchemy 2.0.
Expected behavior
The autogenerated migration includes the variants.
To Reproduce
With the following model definition and then alembic revision --autogenerate.
it's ....not really that simple. alembic knows how to render 2.0's variants, but this has to do with your datatype not being part of SQLAlchemy, and there seems to be a whole codepath that isn't taken for variants that are not within sqlalchemy's modules . it "works" in 1.4 because your type becomes Variant, which is in the normal module path.
but then...it is that simple? because this is is all it needs..
Describe the bug
An autogenerated migration adding a column using a
TypeDecorator
type and awith_variant()
override loses the variants when using SQLAlchemy 2.0.Expected behavior
The autogenerated migration includes the variants.
To Reproduce
With the following model definition and then
alembic revision --autogenerate
.Error
With SQLAlchemy 1.4.46 the following migration is generated:
Whereas with SQLALchemy 2.0.2 the
with_variant()
is missing:Versions.
The text was updated successfully, but these errors were encountered: