SQLServer: The size (60) given to the type 'decimal' exceeds the maximum allowed (#12713).

git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11098 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
Jean-Philippe Lang
2013-01-03 11:21:03 +00:00
parent 9c561f9124
commit 0135dc504a
3 changed files with 9 additions and 9 deletions
+2 -2
View File
@@ -328,7 +328,7 @@ class QueryTest < ActiveSupport::TestCase
f = IssueCustomField.create!(:name => 'filter', :field_format => 'int', :is_filter => true, :is_for_all => true)
query = IssueQuery.new(:project => Project.find(1), :name => '_')
query.add_filter("cf_#{f.id}", '<=', ['30'])
assert query.statement.include?("CAST(custom_values.value AS decimal(60,3)) <= 30.0")
assert query.statement.include?("CAST(custom_values.value AS decimal(30,3)) <= 30.0")
find_issues_with_query(query)
end
@@ -343,7 +343,7 @@ class QueryTest < ActiveSupport::TestCase
f = IssueCustomField.create!(:name => 'filter', :field_format => 'int', :is_filter => true, :is_for_all => true)
query = IssueQuery.new(:project => Project.find(1), :name => '_')
query.add_filter("cf_#{f.id}", '><', ['30', '40'])
assert_include "CAST(custom_values.value AS decimal(60,3)) BETWEEN 30.0 AND 40.0", query.statement
assert_include "CAST(custom_values.value AS decimal(30,3)) BETWEEN 30.0 AND 40.0", query.statement
find_issues_with_query(query)
end