Skip to content

Commit

Permalink
AR8::SchemaMigration.new takes a connection_pool
Browse files Browse the repository at this point in the history
  • Loading branch information
amatsuda committed Jul 10, 2024
1 parent 44ad35a commit b4d1535
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion test/database_rewinder_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,11 @@ def perform_insert(sql)
sub_test_case 'migrations' do
if ActiveRecord::VERSION::STRING >= '7.1'
test '.clean_all should not touch AR::SchemaMigration' do
schema_migration = ActiveRecord::SchemaMigration.new(ActiveRecord::Base.connection)
schema_migration = if ActiveRecord::VERSION::MAJOR >= 8
ActiveRecord::SchemaMigration.new(ActiveRecord::Base.connection_pool)
else
ActiveRecord::SchemaMigration.new(ActiveRecord::Base.connection)
end
schema_migration.create_table

begin
Expand Down

0 comments on commit b4d1535

Please sign in to comment.