From e8f806e2ce3766bca10f21209de5b43f749b5ee0 Mon Sep 17 00:00:00 2001 From: Belen Pruvost Date: Thu, 4 Nov 2021 12:31:03 +0100 Subject: [PATCH] SONAR-15587 - Change DB Migration for sonarlint_ad_seen --- .../src/main/resources/org/sonar/db/user/UserMapper.xml | 2 +- .../db/migration/version/v92/UpsertSonarlintAdSeenValue.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml index 6533abbfbf5..b6d4b139e3c 100644 --- a/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml +++ b/server/sonar-db-dao/src/main/resources/org/sonar/db/user/UserMapper.xml @@ -181,7 +181,7 @@ update users set - sonarlint_ad_seen = true + sonarlint_ad_seen = ${_true} where login = #{login, jdbcType=VARCHAR} diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/UpsertSonarlintAdSeenValue.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/UpsertSonarlintAdSeenValue.java index cb1e72c3621..57de8b600e7 100644 --- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/UpsertSonarlintAdSeenValue.java +++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v92/UpsertSonarlintAdSeenValue.java @@ -32,7 +32,9 @@ public class UpsertSonarlintAdSeenValue extends DataChange { @Override protected void execute(Context context) throws SQLException { - Upsert upsert = context.prepareUpsert("update users set sonarlint_ad_seen = true where last_sonarlint_connection is not null"); + Upsert upsert = context.prepareUpsert("update users set sonarlint_ad_seen = ? where last_sonarlint_connection is not null"); + upsert + .setBoolean(1, true); upsert.execute(); upsert.commit(); } -- 2.39.5