method
indexes
indexes(table, stream)
private
Hide source
# File activerecord/lib/active_record/schema_dumper.rb, line 162 def indexes(table, stream) indexes = @connection.indexes(table) indexes.each do |index| stream.print " add_index #{index.table.inspect}, #{index.columns.inspect}, :name => #{index.name.inspect}" stream.print ", :unique => true" if index.unique stream.puts end stream.puts unless indexes.empty? end