when you run alembic revision with —autogenerate, the database has to be up-to-date. This means that the most “head” version that is in your versions/ directory must be the same version that is in your database in the “alembic_version” table.
So this means one of two things:
1. you need to run alembic upgrade
2. there is a version file in your versions/ directory that you don’t actually want, like you ran alembic revision already, it created a file, and you don’t actually want that file, you’d delete it first.
you can run “alembic history” to see all the versions that are in your versions/ directory in order.