From: Julien Lancelot Date: Wed, 3 Feb 2016 14:08:54 +0000 (+0100) Subject: SONAR-7123 Improve size of PROJECTS.LONG_NAME columns X-Git-Tag: 5.4-M12~9 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=22827addf46dc8c67426fb70a223f2e313741782;p=sonarqube.git SONAR-7123 Improve size of PROJECTS.LONG_NAME columns --- diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1016_increase_projects_long_name_size.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1016_increase_projects_long_name_size.rb new file mode 100644 index 00000000000..0ac8120a5c9 --- /dev/null +++ b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1016_increase_projects_long_name_size.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.4 +# SONAR-7123 +# +class IncreaseProjectsLongNameSize < ActiveRecord::Migration + + def self.up + change_column('projects', 'long_name', :string, :limit => 2000, :null => true) + end + +end diff --git a/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java b/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java index 96f236dcc49..dcd66d08151 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java +++ b/sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java @@ -29,7 +29,7 @@ import org.sonar.db.MyBatis; public class DatabaseVersion { - public static final int LAST_VERSION = 1015; + public static final int LAST_VERSION = 1016; /** * The minimum supported version which can be upgraded. Lower diff --git a/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql b/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql index 27cc3e73c39..83fd226a751 100644 --- a/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql +++ b/sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql @@ -376,6 +376,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1012'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1013'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1014'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1015'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1016'); INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, EXTERNAL_IDENTITY, EXTERNAL_IDENTITY_PROVIDER, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'admin', 'sonarqube', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '1418215735482', '1418215735482', null, null); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2; diff --git a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl b/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl index 781fa94ed3f..df7f25dd860 100644 --- a/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl +++ b/sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl @@ -254,7 +254,7 @@ CREATE TABLE "PROJECTS" ( "PATH" VARCHAR(2000), "LANGUAGE" VARCHAR(20), "COPY_RESOURCE_ID" INTEGER, - "LONG_NAME" VARCHAR(256), + "LONG_NAME" VARCHAR(2000), "PERSON_ID" INTEGER, "CREATED_AT" TIMESTAMP, "AUTHORIZATION_UPDATED_AT" BIGINT