aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
diff options
context:
space:
mode:
authorRyuta Kamizono <kamipo@gmail.com>2016-10-03 06:49:27 +0900
committerRyuta Kamizono <kamipo@gmail.com>2016-10-03 06:49:27 +0900
commit444cf0d6424dcfaef009b9046b23c281791f0e9b (patch)
tree617ec8b219e57343aaeb611172a0d2c633589884 /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
parenta92fa726003880f5d28367459ddaf134c44b1697 (diff)
downloadrails-444cf0d6424dcfaef009b9046b23c281791f0e9b.tar.gz
rails-444cf0d6424dcfaef009b9046b23c281791f0e9b.tar.bz2
rails-444cf0d6424dcfaef009b9046b23c281791f0e9b.zip
Remove unnecessary `respond_to?(:indexes)` checking
Currently all adapters (postgresql, mysql2, sqlite3, oracle-enhanced, and sqlserver) implemented `indexes` and schema dumper expects implemented `indexes`. https://github.com/rails/rails/blob/v5.0.0/activerecord/lib/active_record/schema_dumper.rb#L208 Therefore `respond_to?(:indexes)` checking is unnecessary.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb4
1 files changed, 0 insertions, 4 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
index 29520ed9c8..2d6bf5e874 100644
--- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
+++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb
@@ -1199,10 +1199,6 @@ module ActiveRecord
def index_name_for_remove(table_name, options = {})
return options[:name] if can_remove_index_by_name?(options)
- # if the adapter doesn't support the indexes call the best we can do
- # is return the default index name for the options provided
- return index_name(table_name, options) unless respond_to?(:indexes)
-
checks = []
if options.is_a?(Hash)