diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-11 23:45:02 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-11-11 23:45:02 +0000 |
commit | 047c75fa06f0b76f484acdc75a63e55b4eb24274 (patch) | |
tree | f6a2b978bf5be262703017ccd6190aa718f891f6 /activerecord/lib | |
parent | ae6a513bd16e6b8bf7adb61384fbc140ca604942 (diff) | |
download | rails-047c75fa06f0b76f484acdc75a63e55b4eb24274.tar.gz rails-047c75fa06f0b76f484acdc75a63e55b4eb24274.tar.bz2 rails-047c75fa06f0b76f484acdc75a63e55b4eb24274.zip |
SQLServer: don't report limits for unsupported field types. Closes #2835.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2982 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'activerecord/lib')
-rw-r--r-- | activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb index a91e1ca56f..fecc6a7e1c 100644 --- a/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb +++ b/activerecord/lib/active_record/connection_adapters/sqlserver_adapter.rb @@ -52,6 +52,8 @@ module ActiveRecord @identity = is_identity @is_special = sql_type =~ /text|ntext|image/i ? true : false @scale = scale_value + # SQL Server only supports limits on *char and float types + @limit = nil unless @type == :float or @type == :string end def simplified_type(field_type) |