Method: Sequel::Schema::AlterTableGenerator#add_index

Defined in:
lib/sequel/database/schema_generator.rb

#add_index(columns, opts = OPTS) ⇒ Object

Add an index on the given columns. See CreateTableGenerator#index for available options.

add_index(:artist_id) # CREATE INDEX table_artist_id_index ON table (artist_id)
[View source]

479
480
481
482
# File 'lib/sequel/database/schema_generator.rb', line 479

def add_index(columns, opts = OPTS)
  @operations << {:op => :add_index, :columns => Array(columns)}.merge!(opts)
  nil
end