diff options
author | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-03 11:21:45 +0000 |
---|---|---|
committer | Jean-Philippe Lang <jp_lang@yahoo.fr> | 2013-01-03 11:21:45 +0000 |
commit | dd7d54b3a1d774d720fe17bb6aad6081002759d7 (patch) | |
tree | cdc714508786865e9de3b4740a8936c4b3af7cc2 /app/models | |
parent | 0135dc504a251f2d685b4ace20960437de087b83 (diff) | |
download | redmine-dd7d54b3a1d774d720fe17bb6aad6081002759d7.tar.gz redmine-dd7d54b3a1d774d720fe17bb6aad6081002759d7.zip |
SQLServer: rule is a reserved keyword (#12713).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@11099 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/workflow_rule.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/models/workflow_rule.rb b/app/models/workflow_rule.rb index 2fc020ba1..9abc15228 100644 --- a/app/models/workflow_rule.rb +++ b/app/models/workflow_rule.rb @@ -62,8 +62,8 @@ class WorkflowRule < ActiveRecord::Base else transaction do delete_all :tracker_id => target_tracker.id, :role_id => target_role.id - connection.insert "INSERT INTO #{WorkflowRule.table_name} (tracker_id, role_id, old_status_id, new_status_id, author, assignee, field_name, rule, type)" + - " SELECT #{target_tracker.id}, #{target_role.id}, old_status_id, new_status_id, author, assignee, field_name, rule, type" + + connection.insert "INSERT INTO #{WorkflowRule.table_name} (tracker_id, role_id, old_status_id, new_status_id, author, assignee, field_name, #{connection.quote_column_name 'rule'}, type)" + + " SELECT #{target_tracker.id}, #{target_role.id}, old_status_id, new_status_id, author, assignee, field_name, #{connection.quote_column_name 'rule'}, type" + " FROM #{WorkflowRule.table_name}" + " WHERE tracker_id = #{source_tracker.id} AND role_id = #{source_role.id}" end |