If you delete your /migrations
folder, the version is still saved in the database. You must also delete this version in the database:
- Delete alembic_version table from database using psql:
$ psql postgres
\connect <Database>
DROP TABLE alembic_version;
\q
- If your target database is not up to date, you will also have to run:
$ flask db stamp head
$ flask db upgrade
- If you need to delete the
alembic_version
table on Heroku, run the following:
$ herok psql
delete from alembic_version;