instance method
rename_index
Ruby on Rails 4.2.9
Since v4.2.9Signature
rename_index(table_name, old_name, new_name)
No documentation comment.
Parameters
-
table_namereq -
old_namereq -
new_namereq
Source
# File activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb, line 495
def rename_index(table_name, old_name, new_name)
validate_index_length!(table_name, new_name)
execute "ALTER INDEX #{quote_column_name(old_name)} RENAME TO #{quote_table_name(new_name)}"
end
Defined in activerecord/lib/active_record/connection_adapters/postgresql/schema_statements.rb line 495
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::PostgreSQL::SchemaStatements