From: Sébastien Lesaint Date: Fri, 9 Sep 2016 13:06:30 +0000 (+0200) Subject: SONAR-8058 fix DB migration of views definition (wrong key) X-Git-Tag: 6.1-RC1~146 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=refs%2Fpull%2F1229%2Fhead;p=sonarqube.git SONAR-8058 fix DB migration of views definition (wrong key) --- diff --git a/sonar-db/src/main/java/org/sonar/db/version/v61/RemoveViewsDefinitionFromProperties.java b/sonar-db/src/main/java/org/sonar/db/version/v61/RemoveViewsDefinitionFromProperties.java index 389a5f7666e..83efeb5aeac 100644 --- a/sonar-db/src/main/java/org/sonar/db/version/v61/RemoveViewsDefinitionFromProperties.java +++ b/sonar-db/src/main/java/org/sonar/db/version/v61/RemoveViewsDefinitionFromProperties.java @@ -64,7 +64,7 @@ public class RemoveViewsDefinitionFromProperties extends BaseDataChange { " (?,?,?,?)")) { long now = system2.now(); insert - .setString(1, "xmlDefinition") + .setString(1, "views.def") .setBoolean(2, false) .setString(3, property) .setLong(4, now) diff --git a/sonar-db/src/test/java/org/sonar/db/version/v61/RemoveViewsDefinitionFromPropertiesTest.java b/sonar-db/src/test/java/org/sonar/db/version/v61/RemoveViewsDefinitionFromPropertiesTest.java index cb5a713705a..bcabb800230 100644 --- a/sonar-db/src/test/java/org/sonar/db/version/v61/RemoveViewsDefinitionFromPropertiesTest.java +++ b/sonar-db/src/test/java/org/sonar/db/version/v61/RemoveViewsDefinitionFromPropertiesTest.java @@ -77,7 +77,7 @@ public class RemoveViewsDefinitionFromPropertiesTest { Map internalProp = db.selectFirst("select" + " kee as \"key\", is_empty as \"isEmpty\", text_value as \"textValue\", clob_value as \"clobValue\", created_at as \"createdAt\"" + " from internal_properties"); - assertThat(internalProp.get("key")).isEqualTo("xmlDefinition"); + assertThat(internalProp.get("key")).isEqualTo("views.def"); assertThat(internalProp.get("isEmpty")).isEqualTo(false); if (isClob) { assertThat(internalProp.get("clobValue")).isEqualTo(xml);