From be5cb5c8b0ca18a6210900a65661cf3bce86bfe7 Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Sun, 11 May 2014 10:31:35 +0200 Subject: [PATCH] SONAR-5280 fix compatibility with mysql 5.7.3 --- .../lib/active_record/connection_adapters/mysql_adapter.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/mysql_adapter.rb b/sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/mysql_adapter.rb index c50022bd89c..4c52720d212 100644 --- a/sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/mysql_adapter.rb +++ b/sonar-server/src/main/webapp/WEB-INF/gems/gems/activerecord-2.3.15/lib/active_record/connection_adapters/mysql_adapter.rb @@ -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 }, -- 2.39.5