Make `ActiveRecord::Migrator` idempotent again in test environment
What does this MR do?
Test environment performance improvement in https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/initializers/ar_speed_up_migration_checking.rb wiped idempotency out of ActiveRecord::Migrator
.
This MR brings it back.
We still benefit from the performance improvement, because Enumerable#dup
makes a shallow copy of an Array, we still do not calculate all MigrationProxies
many times when specs are executed.
What are the relevant issue numbers?
Closes #33030 (closed)
Edited by Grzegorz Bizon