Skip to content

Commit fbf7aa6

Browse files
author
lawrence
committed
SQLServer NULL defaults not always handled correctly. Closes 10257. [mikewoodhouse]
git-svn-id: http://dev.rubyonrails.org/svn/rails/adapters/sqlserver@8241 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
1 parent 15865be commit fbf7aa6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

lib/active_record/connection_adapters/sqlserver_adapter.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -287,7 +287,7 @@ def columns(table_name, name = nil)
287287
#result = @connection.select_all(sql)
288288
columns = []
289289
result.each do |field|
290-
default = field[:DefaultValue].to_s.gsub!(/[()\']/,"") =~ /null/ ? nil : field[:DefaultValue]
290+
default = field[:DefaultValue].to_s.gsub!(/[()\']/,"") =~ /null/i ? nil : field[:DefaultValue]
291291
if field[:ColType] =~ /numeric|decimal/i
292292
type = "#{field[:ColType]}(#{field[:numeric_precision]},#{field[:numeric_scale]})"
293293
else

0 commit comments

Comments
 (0)