diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-06-08 01:40:05 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-06-08 01:40:05 +0000 |
commit | 9b444fe73beaddccd5664d0e0f17f948f00680bf (patch) | |
tree | 0b52197049b50f6da543ae671eedc4cf4be9f317 /activerecord/lib/active_record | |
parent | 72401dcbd61f419a2a5300149cd87918bbc4ce1d (diff) | |
download | rails-9b444fe73beaddccd5664d0e0f17f948f00680bf.tar.gz rails-9b444fe73beaddccd5664d0e0f17f948f00680bf.tar.bz2 rails-9b444fe73beaddccd5664d0e0f17f948f00680bf.zip |
Rollback [6961] which breaks SQLite tests. Reference #7345.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6965 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb | 3 |
1 files changed, 1 insertions, 2 deletions
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 80f9e52f80..b6c3949a5a 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_definitions.rb @@ -351,8 +351,7 @@ module ActiveRecord # There's a short-hand method for each of the type values declared at the top. And then there's # TableDefinition#timestamps that'll add created_at and updated_at as datetimes. def column(name, type, options = {}) - raise "You already defined column '#{name}'." if self[name] - column = ColumnDefinition.new(@base, name, type) + column = self[name] || ColumnDefinition.new(@base, name, type) column.limit = options[:limit] || native[type.to_sym][:limit] if options[:limit] or native[type.to_sym] column.precision = options[:precision] column.scale = options[:scale] |