miguelgrinberg / Flask-Migrate

SQLAlchemy database migrations for Flask applications using Alembic
MIT License
2.35k stars 227 forks source link

sqlalchemy.exc.OperationalError: (sqlite3.OperationalError) table sqlite_sequence may not be dropped #375

Closed Mr-NB closed 3 years ago

Mr-NB commented 3 years ago

when i run 'db migrate' , show image

Then i run 'db upgrade' ,i get expection:

image

how can i ignore sqlite_sequence ???

Libary version: flask-migrate 2.5.3 flask-sqlalchemy 2.4.4 python 2.7.16

miguelgrinberg commented 3 years ago

Alembic should ignore this table, since it is internal to SQLite. I do not know what in your application this is not ignored, it could be a bug with Alembic. I suggest you try regenerating your database to see if the problem continues. In that case you will need to submit a bug to the Alembic project.

svanscho commented 2 years ago

@Mr-NB did you fix this in the end? Is there any documentation you could point me to?

elandorr commented 2 years ago

@svanscho Here's my interim fix: https://github.com/sqlalchemy/alembic/issues/1062