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
SQLite batch migrations: missing operations for index #287
Comments
Changes by Thomas Tanner (@ttanner):
|
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. |
Michael Bayer (@zzzeek) wrote: no bug in the --sql case, offline mode with batch requires additional, documented steps that aren't present in your test case. |
Thomas Tanner (@ttanner) wrote: agreed. I just think a more useful error message would be helpful in the offline case. |
Michael Bayer (@zzzeek) wrote: separate issue then. |
Michael Bayer (@zzzeek) wrote:
→ 2af6e43 |
Changes by Michael Bayer (@zzzeek):
|
Migrated issue, originally created by Thomas Tanner (@ttanner)
I'm trying to use batch migrations with SQLite.
Here's a very simple example:
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
The text was updated successfully, but these errors were encountered: