diff options
author | Ryuta Kamizono <kamipo@gmail.com> | 2016-10-03 07:35:54 +0900 |
---|---|---|
committer | Ryuta Kamizono <kamipo@gmail.com> | 2017-01-04 08:48:59 +0900 |
commit | 457e6c77d421a36b763441a2c262f580114a20d5 (patch) | |
tree | e34cbfb2fe58f207d59aade9352d1a1162aea4fc /activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb | |
parent | 032fe34803233d242927873b5559b4efc5ca215a (diff) | |
download | rails-457e6c77d421a36b763441a2c262f580114a20d5.tar.gz rails-457e6c77d421a36b763441a2c262f580114a20d5.tar.bz2 rails-457e6c77d421a36b763441a2c262f580114a20d5.zip |
Deprecate passing `name` to `indexes` like `tables`
Passing `name` to `tables` is already deprecated at #21601.
Passing `name` to `indexes` is also unused.
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb index 85836fc575..bfda113e40 100644 --- a/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb @@ -166,7 +166,13 @@ module ActiveRecord end # Returns an array of indexes for the given table. - def indexes(table_name, name = nil) + def indexes(table_name, name = nil) # :nodoc: + if name + ActiveSupport::Deprecation.warn(<<-MSG.squish) + Passing name to #indexes is deprecated without replacement. + MSG + end + table = Utils.extract_schema_qualified_name(table_name.to_s) result = query(<<-SQL, "SCHEMA") |