diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-05-11 17:14:09 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2016-05-12 10:28:09 +0200 |
commit | 26d47bfc36a0374c06569cf2a99fc9b8c9978c28 (patch) | |
tree | 821a2ac7c122c41d358654d6823afeaac4de2a42 /server | |
parent | d8a4233907f061895ae60fe86c6ba5ef5c447d3a (diff) | |
download | sonarqube-26d47bfc36a0374c06569cf2a99fc9b8c9978c28.tar.gz sonarqube-26d47bfc36a0374c06569cf2a99fc9b8c9978c28.zip |
SONAR-7630 Do not use MySQL TINYINT(1) for non-boolean columns
Diffstat (limited to 'server')
3 files changed, 34 insertions, 3 deletions
diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java index 6f2a5b1b667..94d41fd68d9 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel1.java @@ -34,7 +34,6 @@ import org.sonar.db.DefaultDatabase; import org.sonar.db.purge.PurgeProfiler; import org.sonar.db.semaphore.SemaphoresImpl; import org.sonar.db.version.DatabaseVersion; -import org.sonar.db.version.MigrationStepModule; import org.sonar.server.app.ProcessCommandWrapperImpl; import org.sonar.server.app.RestartFlagHolderImpl; import org.sonar.server.db.EmbeddedDatabaseFactory; @@ -114,7 +113,6 @@ public class PlatformLevel1 extends PlatformLevel { org.sonar.core.properties.PropertiesDao.class); addAll(CorePropertyDefinitions.all()); addAll(CePropertyDefinitions.all()); - add(MigrationStepModule.class); } private void addExtraRootComponents() { diff --git a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java index 496a3b049f8..996aa970dbe 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java +++ b/server/sonar-server/src/main/java/org/sonar/server/platform/platformlevel/PlatformLevel2.java @@ -25,6 +25,7 @@ import org.sonar.core.i18n.RuleI18nManager; import org.sonar.core.platform.PluginClassloaderFactory; import org.sonar.core.platform.PluginLoader; import org.sonar.db.charset.DatabaseCharsetChecker; +import org.sonar.db.version.MigrationStepModule; import org.sonar.server.db.CheckDatabaseCharsetAtStartup; import org.sonar.server.db.migrations.DatabaseMigrator; import org.sonar.server.db.migrations.PlatformDatabaseMigration; @@ -71,6 +72,7 @@ public class PlatformLevel2 extends PlatformLevel { // DB migration PlatformDatabaseMigrationExecutorServiceImpl.class, - PlatformDatabaseMigration.class); + PlatformDatabaseMigration.class, + MigrationStepModule.class); } } diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1150_fix_type_of_rule_type_on_mysql.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1150_fix_type_of_rule_type_on_mysql.rb new file mode 100644 index 00000000000..b892c080ea0 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1150_fix_type_of_rule_type_on_mysql.rb @@ -0,0 +1,31 @@ +# +# SonarQube, open source software quality management tool. +# Copyright (C) 2008-2014 SonarSource +# mailto:contact AT sonarsource DOT com +# +# SonarQube is free software; you can redistribute it and/or +# modify it under the terms of the GNU Lesser General Public +# License as published by the Free Software Foundation; either +# version 3 of the License, or (at your option) any later version. +# +# SonarQube is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +# Lesser General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public License +# along with this program; if not, write to the Free Software Foundation, +# Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +# + +# +# SonarQube 5.6 +# SONAR-7630 +# +class FixTypeOfRuleTypeOnMysql < ActiveRecord::Migration + + def self.up + execute_java_migration('org.sonar.db.version.v56.FixTypeOfRuleTypeOnMysql') + end + +end |