The way I perform migration for a database is
1. run command alembic upgrade head
to upgrade the local postgres to match database schema.
2. update the model to add new column (or index) to a table.
3. then run alembic revision --autogenerate -m "Message for the migration"
to generate a new migration python file in migrations/migrate/versions
folder.
4. then run almebic upgrade head
again to apply the new change to Postgres.
5. confirm whether the column (or index) was generated.
Above flow works great for me, but I want to know how much time it took for the migration to complete.