]> source.dussan.org Git - sonarqube.git/commitdiff
Fix profile renaming on Oracle
authorSimon Brandhof <simon.brandhof@gmail.com>
Fri, 12 Oct 2012 14:35:02 +0000 (16:35 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Fri, 12 Oct 2012 14:35:02 +0000 (16:35 +0200)
sonar-server/src/main/webapp/WEB-INF/app/models/profile.rb

index a57d9129f5b1447793e2f7a540eab868621b34ac..c4197f87fb6867407a860c4a24d5b07a65cf53ce 100644 (file)
@@ -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