Skip to content

Recent migration generated by db migrate wants to change all IDENTITY columns to INTEGER #556

Answered by miguelgrinberg
rosensama asked this question in Q&A
Discussion options

You must be logged in to vote

If I have to make a guess, I'd say that the database you are generating these migrations against does not match the definitions in your models and your previous migrations, and for that reason it is trying to make a correction to make everything match. I guess you can inspect the schema of the affected table(s) to see how the id is defined. The original migration that you copied above appears to agree with the definition that Flask-Migrate is trying to migrate to, so you either have some other migration that changed these ids to the other format, or else the database was changed outside of this application.

One thing you can try is to generate a new database by running all your migrations…

Replies: 1 comment 7 replies

Comment options

You must be logged in to vote
7 replies
@rosensama
Comment options

@rosensama
Comment options

@miguelgrinberg
Comment options

Answer selected by rosensama
@rosensama
Comment options

@rosensama
Comment options

@miguelgrinberg
Comment options

@rosensama
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants