]> source.dussan.org Git - sonarqube.git/commitdiff
Force creation of MySQL tables with UTF8 character set and utf8_bin collation
authorSimon Brandhof <simon.brandhof@gmail.com>
Fri, 23 Sep 2011 08:35:02 +0000 (10:35 +0200)
committerSimon Brandhof <simon.brandhof@gmail.com>
Fri, 23 Sep 2011 08:38:00 +0000 (10:38 +0200)
sonar-server/src/main/webapp/WEB-INF/vendor/gems/activerecord-jdbc-adapter-1.1.3/lib/arjdbc/mysql/adapter.rb

index 79526df1390ecc4e58ade38388276d1cee92dd34..891d59ae89dde5a20217a832aa118f0ab6bd5ba9 100644 (file)
@@ -242,7 +242,10 @@ module ::ArJdbc
     end
 
     def create_table(name, options = {}) #:nodoc:
-      super(name, {:options => "ENGINE=InnoDB"}.merge(options))
+      #sonar - force UTF8
+      #super(name, {:options => "ENGINE=InnoDB"}.merge(options))
+      super(name, {:options => "ENGINE=InnoDB CHARACTER SET utf8 COLLATE utf8_bin"}.merge(options))
+      #/sonar
     end
 
     def rename_table(name, new_name)