From: Simon Brandhof Date: Thu, 28 Nov 2013 22:18:31 +0000 (+0100) Subject: SONAR-4926 Primary key of the table ISSUES is too short X-Git-Tag: 4.1-RC1~171 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=b8289c9ae59e28ebfb08cecefce81a33e3c27b25;p=sonarqube.git SONAR-4926 Primary key of the table ISSUES is too short --- diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java index 6ddf2dbc146..7af4c474942 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java @@ -33,7 +33,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 463; + public static final int LAST_VERSION = 462; public static enum Status { UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql index b268b1e4bb5..90092a55eb2 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql @@ -177,6 +177,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('430'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('431'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('432'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('433'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('434'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('440'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('441'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('442'); diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/434_move_issues_id_to_bigint.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/434_move_issues_id_to_bigint.rb new file mode 100644 index 00000000000..3609be36740 --- /dev/null +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/434_move_issues_id_to_bigint.rb @@ -0,0 +1,33 @@ +# +# Sonar, entreprise quality control tool. +# Copyright (C) 2008-2013 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. +# + +# +# Sonar 3.7.4 +# SONAR-4926 +# +class MoveIssuesIdToBigint < ActiveRecord::Migration + + def self.up + alter_to_big_primary_key('issues') + alter_to_big_primary_key('issue_changes') + end + +end + diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/463_move_issues_id_to_bigint.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/463_move_issues_id_to_bigint.rb deleted file mode 100644 index 0cc92a9dfb3..00000000000 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/463_move_issues_id_to_bigint.rb +++ /dev/null @@ -1,33 +0,0 @@ -# -# Sonar, entreprise quality control tool. -# Copyright (C) 2008-2013 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. -# - -# -# Sonar 4.1 -# SONAR-4926 -# -class MoveIssuesIdToBigint < ActiveRecord::Migration - - def self.up - alter_to_big_primary_key('issues') - alter_to_big_primary_key('issue_changes') - end - -end -