flask SQLAlchemy db_migrate failing on large migration using SmallInteger #480
-
Hello Miguel, I owe you a debt of thanks for this tremendous effort - I use your databases all day everyday. Thank you. I've never run in to an issue with migrations before, but today I encountered many errors. I was added something like 60 columns, and out of those about 10-15 were the type db.Column(db.SmallInteger, default=False) Every time one of those rows was processed, the migrate would throw an error. I checked my code for hours, but ultimately found that if I just kept running migrate, it would jump through these issues, and eventually migrated all columns. Tracebacks and pip freeze are below:
I'm reluctant to push this to my production server in case there are more significant issues. I appreciate any help very much. Best, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 21 replies
-
This is probably an Alembic issue. Flask-Migrate doesn't do any of this, I just take care of the integration of Alembic with Flask. You may want to create an example that reproduces the problem and get advice from the Alembic team on it. |
Beta Was this translation helpful? Give feedback.
This is probably an Alembic issue. Flask-Migrate doesn't do any of this, I just take care of the integration of Alembic with Flask. You may want to create an example that reproduces the problem and get advice from the Alembic team on it.