Apparently people were mutating this array. :'(
This reverts commit abba61e2bbe320894ba8449ebdf778a1d2af545b.
This commit is contained in:
parent
abba61e2bb
commit
ee46011137
@ -63,16 +63,15 @@ def add_column_options!(sql, options)
|
||||
class TableDefinition
|
||||
# An array of ColumnDefinition objects, representing the column changes
|
||||
# that have been defined.
|
||||
attr_accessor :indexes
|
||||
attr_accessor :columns, :indexes
|
||||
|
||||
def initialize(base)
|
||||
@columns = []
|
||||
@columns_hash = {}
|
||||
@indexes = {}
|
||||
@base = base
|
||||
end
|
||||
|
||||
def columns; @columns_hash.values; end
|
||||
|
||||
def xml(*args)
|
||||
raise NotImplementedError unless %w{
|
||||
sqlite mysql mysql2
|
||||
@ -302,6 +301,7 @@ def create_column_definition(base, name, type)
|
||||
|
||||
def new_column_definition(base, name, type)
|
||||
definition = create_column_definition base, name, type
|
||||
@columns << definition
|
||||
@columns_hash[name] = definition
|
||||
definition
|
||||
end
|
||||
|
Loading…
Reference in New Issue
Block a user