From: Jean-Baptiste Vilain Date: Tue, 2 Jul 2013 15:20:31 +0000 (+0200) Subject: SONAR-4463 Renamed permissions tables to comply with the max length constraint on... X-Git-Tag: 3.7~286 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=cf7b6b92b777146430fcf8f3b4a5666a3f08ad51;p=sonarqube.git SONAR-4463 Renamed permissions tables to comply with the max length constraint on Oracle --- diff --git a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java index 222f6090d00..aba584bcaa3 100644 --- a/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java +++ b/sonar-core/src/main/java/org/sonar/core/persistence/DatabaseUtils.java @@ -72,8 +72,8 @@ public final class DatabaseUtils { "metrics", "notifications", "permission_templates", - "permission_templates_users", - "permission_templates_groups", + "perm_templates_users", + "perm_templates_groups", "projects", "project_links", "project_measures", diff --git a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl index 22b9d284ae9..76d10c54a4b 100644 --- a/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl +++ b/sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl @@ -540,7 +540,7 @@ CREATE TABLE "PERMISSION_TEMPLATES" ( "UPDATED_AT" TIMESTAMP ); -CREATE TABLE "PERMISSION_TEMPLATES_USERS" ( +CREATE TABLE "PERM_TEMPLATES_USERS" ( "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), "USER_LOGIN" VARCHAR(40) NOT NULL, "TEMPLATE_NAME" VARCHAR(100) NOT NULL, @@ -548,7 +548,7 @@ CREATE TABLE "PERMISSION_TEMPLATES_USERS" ( "UPDATED_AT" TIMESTAMP ); -CREATE TABLE "PERMISSION_TEMPLATES_GROUPS" ( +CREATE TABLE "PERM_TEMPLATES_GROUPS" ( "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), "GROUP_ID" INTEGER, "TEMPLATE_NAME" VARCHAR(100) NOT NULL, diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/416_create_permission_templates_users.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/416_create_permission_templates_users.rb index 36b3d2214e8..ee85d9378b2 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/416_create_permission_templates_users.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/416_create_permission_templates_users.rb @@ -24,7 +24,7 @@ class CreatePermissionTemplatesUsers < ActiveRecord::Migration def self.up - create_table :permission_templates_users do |t| + create_table :perm_templates_users do |t| t.column :user_login, :string, :null => false, :limit => 40 t.column :template_name, :string, :null => false, :limit => 100 t.column :created_at, :datetime, :null => true diff --git a/sonar-server/src/main/webapp/WEB-INF/db/migrate/417_create_permission_templates_groups.rb b/sonar-server/src/main/webapp/WEB-INF/db/migrate/417_create_permission_templates_groups.rb index 3c6b08d866b..6ad66c99515 100644 --- a/sonar-server/src/main/webapp/WEB-INF/db/migrate/417_create_permission_templates_groups.rb +++ b/sonar-server/src/main/webapp/WEB-INF/db/migrate/417_create_permission_templates_groups.rb @@ -24,7 +24,7 @@ class CreatePermissionTemplatesGroups < ActiveRecord::Migration def self.up - create_table :permission_templates_groups do |t| + create_table :perm_templates_groups do |t| t.column :group_id, :integer, :null => true t.column :template_name, :string, :null => false, :limit => 100 t.column :created_at, :datetime, :null => true