From f84cf418f607c69d3e71fc6e7a161d224fc7fb86 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Sat, 16 Mar 2013 15:17:32 -0700 Subject: there is no reason to check for an already defined column --- .../active_record/connection_adapters/abstract/schema_definitions.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/lib/active_record') diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb index fe381bcf01..922a544e81 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -218,7 +218,7 @@ module ActiveRecord raise ArgumentError, "you can't redefine the primary key column '#{name}'. To define a custom primary key, pass { id: false } to create_table." end - @columns_hash[name] ||= new_column_definition(name, type, options) + @columns_hash[name] = new_column_definition(name, type, options) self end -- cgit v1.2.3