Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Rails 7.2+ #101

Merged
merged 2 commits into from
Jun 5, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/database_cleaner/active_record/base.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,9 @@ def self.config_file_location

class Base < DatabaseCleaner::Strategy
def self.migration_table_name
if Gem::Version.new("6.0.0") <= ::ActiveRecord.version
if Gem::Version.new("7.1.0") < ::ActiveRecord.version
::ActiveRecord::Base.connection_pool.schema_migration.table_name
elsif Gem::Version.new("6.0.0") <= ::ActiveRecord.version
::ActiveRecord::Base.connection.schema_migration.table_name
else
::ActiveRecord::SchemaMigration.table_name
Expand Down
Loading