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
SQLite batch migrations: missing operations for index #287
Migrated issue, originally created by Thomas Tanner (@ttanner)
I'm trying to use batch migrations with SQLite.
In env.py I have added render_as_batch=True and set the metadata
alembic revision --autogenerate creates:
Then "alembic upgrade head" fails with:
"alembic upgrade head --sql" fails with:
sqlalchemy 0.9.9, alembic 0.7.5post2, Python 2.7.9
Michael Bayer (@zzzeek) wrote:
what's unusual here is that the "create index" is in the batch context at all. SQLite supports CREATE INDEX and DROP INDEX. moving it out of "batch" would resolve. Though it looks like in source code that index moves were intended to be within the batch for that table in any case, and the method is just named incorrectly. which means the bug is that a test wasn't added for this.