Class: ROM::SQL::Migration::SchemaDiff::IndexAdded Private

Inherits:
IndexDiff
  • Object
show all
Defined in:
lib/rom/sql/migration/schema_diff.rb

This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.

Instance Method Summary collapse

Constructor Details

This class inherits a constructor from ROM::SQL::Migration::SchemaDiff::IndexDiff

Instance Method Details

#optionsObject

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



135
136
137
138
139
140
141
142
# File 'lib/rom/sql/migration/schema_diff.rb', line 135

def options
  options = {}
  options[:name] = index.name unless index.name.nil?
  options[:unique] = true if index.unique?
  options[:type] = index.type unless index.type.nil?
  options[:where] = index.predicate unless index.predicate.nil?
  options
end