I am trying to do schema migration in PostgreSQL via Alembic.
Following this question Undo last alembic migration
I have 2 migrations with:
revision = '0eb4bd9decb0',down_revision = None
--and
revision = 'bf34bf428845' ,down_revision = '0eb4bd9decb0'
So I am successfully run migrations from both migration files by:
alembic upgrade 0eb4bd9decb0
alembic upgrade bf34bf428845
Now I have a problem in Downgrading these migration i.e I want to downgrade migration with revision= 'bf34bf428845'
so I write:
alembic downgrade bf34bf428845
But It is not Working and not showing any error
Output of above code:
(migration) C:\xampp\htdocs\dbmigration python\migration\db>alembic downgrade bf34bf428845
INFO [alembic.runtime.migration] Context impl PostgresqlImpl.
INFO [alembic.runtime.migration] Will assume transactional DDL.
but if I run this code:
alembic downgrade -1
It is working as expected as per by Undo last Alembic migration
My question:
How can I downgrade alembic migration by revision id?