diff options
Diffstat (limited to 'spec/support/database/prevent_cross_database_modification.rb')
-rw-r--r-- | spec/support/database/prevent_cross_database_modification.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/support/database/prevent_cross_database_modification.rb b/spec/support/database/prevent_cross_database_modification.rb index c793c1c008b..fe9e8a6e021 100644 --- a/spec/support/database/prevent_cross_database_modification.rb +++ b/spec/support/database/prevent_cross_database_modification.rb @@ -91,6 +91,11 @@ module Database return if tables.empty? + # All migrations will write to schema_migrations in the same transaction. + # It's safe to ignore this since schema_migrations exists in all + # databases + return if tables == ['schema_migrations'] + cross_database_context[:modified_tables_by_db][database].merge(tables) all_tables = cross_database_context[:modified_tables_by_db].values.map(&:to_a).flatten |