Skip to content

Commit

Permalink
remove version checking
Browse files Browse the repository at this point in the history
  • Loading branch information
Kristaps Kulikovskis committed Sep 27, 2017
1 parent 945e814 commit 0c5e31e
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions lib/database_flusher/active_record/deletion_strategy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,8 @@ def adapter
def all_tables
# NOTE connection.tables warns on AR 5 with some adapters
tables = ActiveSupport::Deprecation.silence { connection.tables }
migrations_table = defined?(::Rails) && ::Rails::VERSION::MAJOR >= 4 ? ::ActiveRecord::SchemaMigration.table_name : ::ActiveRecord::Migrator.schema_migrations_table_name

tables.reject do |t|
(t == migrations_table) ||
(t == ::ActiveRecord::SchemaMigration.table_name) ||
(::ActiveRecord::Base.respond_to?(:internal_metadata_table_name) &&
(t == ::ActiveRecord::Base.internal_metadata_table_name))
end
Expand Down

0 comments on commit 0c5e31e

Please sign in to comment.