A previous rake db:rollback stalled. Now when attempting a new migration we get the following error:
rake aborted! ActiveRecord::ConcurrentMigrationError:
For me it was resolved in this way:
Select advisory locks:
SELECT pid, locktype, mode FROM pg_locks WHERE locktype = 'advisory';
SELECT pg_terminate_backend();