diff options
author | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-12-02 15:26:38 +0100 |
---|---|---|
committer | Simon Brandhof <simon.brandhof@sonarsource.com> | 2014-12-02 15:30:40 +0100 |
commit | a92fbd733456d69b385324fab85e7ad541d3038a (patch) | |
tree | d46461444733d6914ef146c514a2c09d73d970b6 /server/sonar-server/src | |
parent | ebc3a4a29fd3035a37bc8fbc2e7b94c4b85f242c (diff) | |
download | sonarqube-a92fbd733456d69b385324fab85e7ad541d3038a.tar.gz sonarqube-a92fbd733456d69b385324fab85e7ad541d3038a.zip |
Improve reentrancy of InsertProjectsAuthorizationUpdatedAtMigration
Diffstat (limited to 'server/sonar-server/src')
-rw-r--r-- | server/sonar-server/src/main/java/org/sonar/server/db/migrations/v50/InsertProjectsAuthorizationUpdatedAtMigration.java | 2 |
1 files changed, 1 insertions, 1 deletions
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() { |