Flask database migrations on heroku Flask database migrations on heroku flask flask

Flask database migrations on heroku


You must not create the migrations on Heroku itself. The filesystem is ephemeral and anything written programatically will be lost between invocations.

You need to create the migrations locally, commit them to version control, deploy, and only then run them on Heroku.