1

So I've made some changes to my schema on a Flask Server, using SQLite and SQLAlchemy. The database is generally functional and I'm able to add some of the models, as well as update and query all models without issues.

I've changed the id in two of my models from Integer to String in order to implement uuid ids, and since I've received IntegrityError for the mismatching parameter types when I do db.session.add(new_post) and db.session.commit().

If I do flask db migrate, it reports that no changes have been detected. Should I manually fill out a revision file or is there something else I am missing?

davidism
  • 121,510
  • 29
  • 395
  • 339
Maxime Franchot
  • 1,015
  • 1
  • 10
  • 24

1 Answers1

0

In addition to migrating your database, you'll need to upgrade:

flask db upgrade

If this results in an error, you might be encountering database specific constraints. For example, some primary keys cannot be removed without setting cascade rules on deletion for relationships.

Yaakov Bressler
  • 9,056
  • 2
  • 45
  • 69