braintree / pg_ha_migrations

Enforces DDL/migration safety in Ruby on Rails project with an emphasis on explicitly choosing trade-offs and avoiding unnecessary magic.
MIT License
220 stars 23 forks source link

Limit blocking transactions check to current database #68

Closed jcoleman closed 2 years ago

jcoleman commented 2 years ago

The refactor in e9aaaa835f194b9416db102d908e1e5a0cd48f84 unintentionally lost this constraint: the relevant WHERE clause is in a JOIN, and in that commit that JOIN turned into a LEFT JOIN. Here I've resolved that by hoisting the restriction up to the outer query's WHERE clause.