aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Hartmann <hartmann.eric@gmail.com>2018-07-12 08:57:44 +0200
committerSonarTech <sonartech@sonarsource.com>2018-07-12 20:21:20 +0200
commit7aca1803dff7ecf84a8fde4a9824ee930a8c5ead (patch)
tree096e29e8a2bedccbad001ad6c2ebc704717aceb7
parentc6a04150703d1698f3b6f53b9d55a292be8ae7ab (diff)
downloadsonarqube-7aca1803dff7ecf84a8fde4a9824ee930a8c5ead.tar.gz
sonarqube-7aca1803dff7ecf84a8fde4a9824ee930a8c5ead.zip
Fix incorrect SQL for MySQL and MsSQL
-rw-r--r--server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizations.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizations.java b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizations.java
index 197301b64ea..a8bfb4a22ce 100644
--- a/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizations.java
+++ b/server/sonar-db-migration/src/main/java/org/sonar/server/platform/db/migration/version/v73/PopulateSubscriptionOnOrganizations.java
@@ -66,8 +66,8 @@ public class PopulateSubscriptionOnOrganizations extends DataChange {
long now = system2.now();
MassUpdate massUpdate = context.prepareMassUpdate().rowPluralName("organizations");
massUpdate.select("SELECT o.uuid, count(p.uuid) FROM organizations o " +
- "LEFT OUTER JOIN projects p on p.organization_uuid=o.uuid AND p.private=?" +
- "WHERE o.subscription IS NULL " +
+ "LEFT OUTER JOIN projects p on p.organization_uuid=o.uuid AND p.private=? " +
+ "WHERE subscription IS NULL " +
"GROUP BY o.uuid")
.setBoolean(1, true);
massUpdate.update("UPDATE organizations SET subscription=?, updated_at=? WHERE uuid=?");