instance method
index_exists?
Ruby on Rails 6.0.6
Since v3.0.20Signature
index_exists?(column_name, options = {})
Checks to see if an index exists.
unless t.index_exists?(:branch_id) t.index(:branch_id) end
Parameters
-
column_namereq -
optionsopt = {}
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 580
def index_exists?(column_name, options = {})
@base.index_exists?(name, column_name, options)
end
Defined in activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb line 580
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::Table