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
declared_attr __table_args__ are not taken into account #218
Comments
Michael Bayer (@zzzeek) wrote: for the first issue,
output:
you can see your index is right there. For the second part, dupe of #197. |
Changes by Michael Bayer (@zzzeek):
|
Adrian (@thiefmaster) wrote: Hrm, in my case the table and also those indexes already existed - there shouldn't have been any changes. |
Adrian (@thiefmaster) wrote: Using your script I can reproduce the issue if I create the table and index manually and then run it:
Anyway, I guess that means it's SQLAlchemy's fault... |
Michael Bayer (@zzzeek) wrote: yeah, functional indexes on PG don't reflect right now. in this case it would cause the opposite effect, you get the index diff when it shouldn't be there. |
Migrated issue, originally created by Adrian (@thiefmaster)
I have a model containing this method:
(using declared_attr is necessary since I have to reference the column and using a string doesn't work there)
Unfortunately alembic does not detect those index definitions. Also, apparently the
cast
is lost. Is there any clean way to create such indexes in a migration?The text was updated successfully, but these errors were encountered: