Method: ActiveRecord::ConnectionAdapters::IndexDefinition#initialize

Defined in:
activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb

#initialize(table, name, unique = false, columns = [], lengths: {}, orders: {}, opclasses: {}, where: nil, type: nil, using: nil, include: nil, nulls_not_distinct: nil, comment: nil, valid: true) ⇒ IndexDefinition

Returns a new instance of IndexDefinition.



11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb', line 11

def initialize(
  table, name,
  unique = false,
  columns = [],
  lengths: {},
  orders: {},
  opclasses: {},
  where: nil,
  type: nil,
  using: nil,
  include: nil,
  nulls_not_distinct: nil,
  comment: nil,
  valid: true
)
  @table = table
  @name = name
  @unique = unique
  @columns = columns
  @lengths = concise_options(lengths)
  @orders = concise_options(orders)
  @opclasses = concise_options(opclasses)
  @where = where
  @type = type
  @using = using
  @include = include
  @nulls_not_distinct = nulls_not_distinct
  @comment = comment
  @valid = valid
end