I\'ve setup a local Postgres DB with SQLAlchemy and cannot commit my first entry. I keep on getting this error...
ProgrammingError: (ProgrammingError) relation
It means that the entry in table alembic_version
of your db is "39408d6b248d" and there's no migration file related to it in migrations folder (by default migrations/versions
).
So better drop the table alembic_version
from your db and do
$ python app.py db history
to get the new head of migrations, say, 5301c31377f2
Now run $ python app.py db stamp 5301c31377f2
to let alembic know that it's your migration head (which gets stored in table alembic_version
).