FIX: Do not dump schema during production database migrations (PR #12785)

It’s important that we don’t perform pg_dumps against databases running behind pgbouncer.

We had an old monkey-patch to prevent this, but following some recent internal rails refactoring, the patch no longer works. Instead, we can use the official config.active_record.dump_schema_after_migration option.

Setting this to false in production is recommended by Rails, and is the default for newly generated Rails applications.

GitHub