Migration error while executing a column type change on batch-mode using SQLite3 #1621
-
Basically i'm trying to change a column type in a sqlite3 db, i tried to do with batch mode but didn't work. Feel free to ask for more context or code, thanks for reading. the code that is getting the error:
The error:
the table:
Versions.
|
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
alembic's SQLite dialect does not attempt to emit ALTER for a column when a batch migration is used. I have copied your migration and run it, here's the output:
I think your issue is that the migration you are running is not using batch. the code that's printed in your stack trace does not match your example:
that would be "batch_op" in your example, not "op" |
Beta Was this translation helpful? Give feedback.
-
Turns out that i was tracking the wrong file that is quite similar to the changes in this snippet, i assumed the file without properly reading the error traceback, sorry for the inconvenience. Thanks for the help. |
Beta Was this translation helpful? Give feedback.
alembic's SQLite dialect does not attempt to emit ALTER for a column when a batch migration is used.
I have copied your migration and run it, here's the output: