https://github.com/sqlalchemy/alembic/issues/751
Check this autogenerate only works when the database is set to the latest data(head) not for the base or previous versions.
as the error of "Target database is not up to date" is itself ask the same so make sure to make it updated to the head then proceed.