From a92fbd733456d69b385324fab85e7ad541d3038a Mon Sep 17 00:00:00 2001 From: Simon Brandhof Date: Tue, 2 Dec 2014 15:26:38 +0100 Subject: [PATCH] Improve reentrancy of InsertProjectsAuthorizationUpdatedAtMigration --- .../v50/InsertProjectsAuthorizationUpdatedAtMigration.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java index 2a07d4d6e73..026f52a1bda 100644 --- a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java +++ b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java @@ -48,7 +48,7 @@ public class InsertProjectsAuthorizationUpdatedAtMigration extends BaseDataChang final long now = system.now(); MassUpdate massUpdate = context.prepareMassUpdate(); - massUpdate.select("SELECT p.id FROM projects p WHERE p.scope=? AND p.enabled=?").setString(1, "PRJ").setBoolean(2, true); + massUpdate.select("SELECT p.id FROM projects p WHERE p.scope=? AND p.enabled=? and p.authorization_updated_at IS NULL").setString(1, "PRJ").setBoolean(2, true); massUpdate.update("UPDATE projects SET authorization_updated_at=? WHERE id=?"); massUpdate.rowPluralName("projects"); massUpdate.execute(new MassUpdate.Handler() { -- 2.39.5