Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Apparently people were mutating this array. :'(

This reverts commit abba61e.
  • Loading branch information...
commit ee460111370905b51f39c5c6566e647bb6d1d0bd 1 parent abba61e
@tenderlove tenderlove authored
View
6 activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb
@@ -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

1 comment on commit ee46011

@jeremy
Owner

Always Be Mutating™

Please sign in to comment.
Something went wrong with that request. Please try again.