instance method
index_exists?
Ruby on Rails 8.0.4
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 -
optionskeyrest
Source
# File activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb, line 768
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 768
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveRecord::ConnectionAdapters::Table