diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-15 15:48:38 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2007-01-15 15:48:38 +0000 |
commit | d1917cfea24af7c6a88975d600867a0ba6dd2d69 (patch) | |
tree | 4c2af01d14d4a74ca8a66af2ece4e4d22a19b425 /activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | |
parent | 64a80ef756ae89e85470b598e9c09b66d50a8103 (diff) | |
download | rails-d1917cfea24af7c6a88975d600867a0ba6dd2d69.tar.gz rails-d1917cfea24af7c6a88975d600867a0ba6dd2d69.tar.bz2 rails-d1917cfea24af7c6a88975d600867a0ba6dd2d69.zip |
Skip column options for primary keys. Closes #7048.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5944 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb index edb3042afc..5ae5362a6d 100644 --- a/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb +++ b/activerecord/lib/active_record/connection_adapters/abstract/schema_statements.rb @@ -254,7 +254,7 @@ module ActiveRecord def type_to_sql(type, limit = nil, precision = nil, scale = nil) #:nodoc: native = native_database_types[type] - column_type_sql = native[:name] + column_type_sql = native.is_a?(Hash) ? native[:name] : native if type == :decimal # ignore limit, use precison and scale precision ||= native[:precision] scale ||= native[:scale] |