diff options
author | Simon Brandhof <simon.brandhof@gmail.com> | 2012-10-01 11:56:14 +0200 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@gmail.com> | 2012-10-01 11:56:53 +0200 |
commit | 5a11c25655690c26fb739a204f8e1883f9f12261 (patch) | |
tree | 8163cb3c6d501c4f1b5a7b913fb76ff150a9c7ed /sonar-core/src/main | |
parent | 08a2dfae36a5f246907e6c37732bb75e7c3ec683 (diff) | |
download | sonarqube-5a11c25655690c26fb739a204f8e1883f9f12261.tar.gz sonarqube-5a11c25655690c26fb739a204f8e1883f9f12261.zip |
SONAR-3833 ability to edit/delete the profiles provided by plugins
Diffstat (limited to 'sonar-core/src/main')
5 files changed, 4 insertions, 7 deletions
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 3c58a5b8187..e35b9cacb74 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 @@ -35,7 +35,7 @@ import java.util.List; */ public class DatabaseVersion implements BatchComponent, ServerComponent { - public static final int LAST_VERSION = 333; + public static final int LAST_VERSION = 335; public static enum Status { UP_TO_DATE, REQUIRES_UPGRADE, REQUIRES_DOWNGRADE, FRESH_INSTALL diff --git a/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDto.java b/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDto.java index eb6d4ef3205..3f6ecbb1663 100644 --- a/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDto.java +++ b/sonar-core/src/main/java/org/sonar/core/template/LoadedTemplateDto.java @@ -25,6 +25,7 @@ public final class LoadedTemplateDto { public static final String DASHBOARD_TYPE = "DASHBOARD"; public static final String FILTER_TYPE = "FILTER"; + public static final String QUALITY_PROFILE_TYPE = "QUALITY_PROFILE"; private Long id; private String key; diff --git a/sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java b/sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java index 40ab93b9cbe..84a1606dfc6 100644 --- a/sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java +++ b/sonar-core/src/main/java/org/sonar/jpa/dao/ProfilesDao.java @@ -28,10 +28,6 @@ public class ProfilesDao extends BaseDao { super(session); } - public RulesProfile getDefaultProfile(String languageKey) { - return getSession().getSingleResult(RulesProfile.class, "defaultProfile", true, "language", languageKey); - } - public RulesProfile getProfile(String languageKey, String profileName) { return getSession().getSingleResult(RulesProfile.class, "language", languageKey, "name", profileName); } 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 cec3ca8ecf6..9b69e992007 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 @@ -175,6 +175,8 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('330'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('331'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('332'); INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('333'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('334'); +INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('335'); INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '2011-09-26 22:27:48.0', '2011-09-26 22:27:48.0', null, null); ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2; 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 9bdff3635cf..05ecbdbe0a0 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 @@ -67,8 +67,6 @@ CREATE TABLE "RULES_PARAMETERS" ( CREATE TABLE "RULES_PROFILES" ( "ID" INTEGER NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1), "NAME" VARCHAR(100) NOT NULL, - "DEFAULT_PROFILE" BOOLEAN DEFAULT FALSE, - "PROVIDED" BOOLEAN NOT NULL DEFAULT FALSE, "LANGUAGE" VARCHAR(20), "PARENT_NAME" VARCHAR(100), "VERSION" INTEGER DEFAULT 1, |