From 6ccbe69b085eadfc18598a9ff87b9d3c360480dc Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Fri, 12 Oct 2012 16:35:02 +0200 Subject: [PATCH] Fix profile renaming on Oracle --- sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb index a57d9129f5b..c4197f87fb6 100644 --- a/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb +++ b/sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb @@ -165,7 +165,9 @@ class Profile < ActiveRecord::Base child.parent_name=new_name child.save end - Property.update_all({:text_value => new_name}, ['prop_key=? and text_value=?', "sonar.profile.#{language}", old_name]) + # PROPERTIES.TEXT_VALUE is CLOB but not VARCHAR. The operator '=' is supported by all the databases except Oracle. For this reason 'like' must be used. + # Repeat avec me : Oracle rocks. + Property.update_all({:text_value => new_name}, ['prop_key=? and text_value like ?', "sonar.profile.#{language}", old_name]) end end self -- 2.39.5