Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
support preliminary rendering of SQL expressions, at least func.XYZ(). #196
Migrated issue, originally created by Mike Clarke (@mikeclarke)
Using the declarative base with alembic HEAD and SQLAlchemy 0.9.4, I'm having trouble autogenerating a unique functional index.
A pair of index create statements are generated:
Ideally, this index definition would create a DDL statement like this:
From IRC, it sounds like this behavior is unexpected. Happy to provide additional detail if this is insufficient. Thanks!
Michael Bayer (@zzzeek) wrote:
the first create_index is due to index=True on the username column, so no bug there. The second index, Alembic doesn't have the capability to render all SQL in reverse like that and probably never will, as it would mean the entire SQLAlchemy expression language would know how to render itself in python. hence these are called only "candidate" migrations along with prominent comments stating that this code may need to be adjusted.