Flask Migrations

I’m new to render and I’m trying to figure things out. Is there a way to downgrade flask migrations on my postgres db? I’m getting an error: ERROR [flask_migrate] Error: Can't locate revision identified by '<revision_number> from a SQLite3 db I created locally, which had some errors in it (local downgrades weren’t working, so I scrapped the db and started over again). When I try to redeploy, I get the error. Should I delete my render DB and start again? I tried restarting the DB and it gave the same error. Thanks for any suggestions!

Hi Keith,

Thanks for reaching out.

I’m not 100% clear on your issue. Are you using a SQLite database or a Render Postgres instance?

Either way, it sounds like you may have a mismatch between your migration files and the database state. I’m not a Flask expert, but from what I can find about that error, it seems there’s a table in the database that tracks migrations that may need a cleared of that revision, if the files have been deleted.

Hope that helps