From 19475814aed64dd6c1f20b12fdb29a5ce90660ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C3=A9bastien=20Lesaint?= Date: Fri, 9 Sep 2016 15:06:30 +0200 Subject: [PATCH] SONAR-8058 fix DB migration of views definition (wrong key) --- .../db/version/v61/RemoveViewsDefinitionFromProperties.java | 2 +- .../db/version/v61/RemoveViewsDefinitionFromPropertiesTest.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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); -- 2.39.5