]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5280 fix compatibility with mysql 5.7.3
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Sun, 11 May 2014 08:31:35 +0000 (10:31 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Sun, 11 May 2014 08:32:37 +0000 (10:32 +0200)
sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/mysql_adapter.rb

index c50022bd89c919e666fe174ab76ca70e0795a908..4c52720d2127bcb2b59156a346ba59d8c2eb896c 100644 (file)
@@ -182,7 +182,12 @@ module ActiveRecord
       QUOTED_TRUE, QUOTED_FALSE = '1'.freeze, '0'.freeze
 
       NATIVE_DATABASE_TYPES = {
-        :primary_key => "int(11) DEFAULT NULL auto_increment PRIMARY KEY".freeze,
+        # SonarQube
+        # Compatibility with mysql 5.7
+        # See https://github.com/rails/rails/commit/26cea8fabe828e7b0535275044cb8316fff1c590
+        #:primary_key => "int(11) DEFAULT NULL auto_increment PRIMARY KEY".freeze,
+        :primary_key => "int(11) auto_increment PRIMARY KEY".freeze,
+        # /SonarQube
         :string      => { :name => "varchar", :limit => 255 },
         :text        => { :name => "text" },
         :integer     => { :name => "int", :limit => 4 },