sqlalchemy 'relation does not exist' after flask migrate #544
-
The detailed write up is here: https://stackoverflow.com/questions/78481263/sqlalchemy-relation-does-not-exist-after-flask-migrate but the short version is that I'm upgrading a Flask-SqlAlchemy app from SqlAlchemy 1.3 to SqlAlchemy 2.0. I have a unit test that walks through the migrations and am finding that when I do a I am trying to understand if this is a Flask-migrate related issue or if there's somewhere else I should look. Our flask migration code looks like:
and we do a I can see the table create in the output (detailed in the stack overflow ticket) but it's like it's ignoring the migration entirely. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 7 replies
-
Does the table exist in your database or not? It is not clear from your question if the problem is that the table does not get created, or that the table does exist but somehow the SQL query isn't seeing it. |
Beta Was this translation helpful? Give feedback.
Ah, thank you. I was getting confused. I replaced my env.py file with the one from this repo, removed
sql=True
, and any other references to running the migration as sql and now it seems to work...