]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6119 Move module UUID path migration, include self on parents
authorJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Thu, 12 Feb 2015 10:20:11 +0000 (11:20 +0100)
committerJean-Baptiste Lievremont <jean-baptiste.lievremont@sonarsource.com>
Fri, 13 Feb 2015 13:39:06 +0000 (14:39 +0100)
server/sonar-server/src/main/java/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPath.java
server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components-result.xml
server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/migrate_components.xml
server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v51/UpdateProjectsModuleUuidPathTest/not_migrate_already_migrated_components.xml
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/767_update_projects_module_uuid_path.rb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/790_update_projects_module_uuid_path.rb [new file with mode: 0644]
sonar-core/src/main/java/org/sonar/core/persistence/DatabaseVersion.java
sonar-core/src/main/resources/org/sonar/core/persistence/rows-h2.sql

index 468887c322b2718d80a27ceb916236ab95cbb4c3..9aba4c963a219c6dc8363f258a1a9deec422e40c 100644 (file)
 package org.sonar.server.db.migrations.v51;
 
 import org.sonar.core.persistence.Database;
-import org.sonar.server.db.migrations.BaseDataChange;
-import org.sonar.server.db.migrations.MassUpdate;
+import org.sonar.server.db.migrations.*;
 import org.sonar.server.db.migrations.MassUpdate.Handler;
 import org.sonar.server.db.migrations.Select.Row;
-import org.sonar.server.db.migrations.SqlStatement;
 
 import javax.annotation.Nullable;
 
@@ -33,6 +31,7 @@ import java.sql.SQLException;
 
 /**
  * SONAR-6054
+ * SONAR-6119
  */
 public class UpdateProjectsModuleUuidPath extends BaseDataChange {
 
@@ -44,37 +43,65 @@ public class UpdateProjectsModuleUuidPath extends BaseDataChange {
 
   @Override
   public void execute(Context context) throws SQLException {
-    MassUpdate update = context.prepareMassUpdate().rowPluralName("projects");
-    update.select("SELECT p.id, p.module_uuid_path FROM projects p");
+    MassUpdate update = context.prepareMassUpdate().rowPluralName("components");
+    update.select("SELECT p.id, p.module_uuid_path, p.uuid, p.scope, p.qualifier FROM projects p");
     update.update("UPDATE projects SET module_uuid_path=? WHERE id=?");
-    update.execute(new Handler() {
-      @Override
-      public boolean handle(Row row, SqlStatement update) throws SQLException {
-        Long id = row.getLong(1);
-        String moduleUuidPath = row.getString(2);
-        if (needUpdate(moduleUuidPath)) {
-          update.setString(1, newModuleUuidPath(moduleUuidPath));
-          update.setLong(2, id);
-          return true;
-        }
-        return false;
-      }
-    });
+    update.execute(new ModuleUuidPathUpdateHandler());
   }
 
-  private static boolean needUpdate(@Nullable String moduleUuidPath) {
-    return moduleUuidPath == null || !(moduleUuidPath.startsWith(SEP) && moduleUuidPath.endsWith(SEP));
-  }
+  private static final class ModuleUuidPathUpdateHandler implements Handler {
+    @Override
+    public boolean handle(Row row, SqlStatement update) throws SQLException {
+      Long id = row.getLong(1);
+      String moduleUuidPath = row.getString(2);
+      String uuid = row.getString(3);
+      String scope = row.getString(4);
+      String qualifier = row.getString(5);
+
+      boolean needUpdate = false;
+      String newModuleUuidPath = moduleUuidPath;
+
+      if (needUpdateForSeparators(moduleUuidPath)) {
+        newModuleUuidPath = newModuleUuidPathWithSeparators(moduleUuidPath);
+        needUpdate = true;
+      }
+
+      if (needUpdateToIncludeItself(newModuleUuidPath, uuid, scope, qualifier)) {
+        newModuleUuidPath = newModuleUuidPathIncludingItself(newModuleUuidPath, uuid);
+        needUpdate = true;
+      }
+
+      if (needUpdate) {
+        update.setString(1, newModuleUuidPath);
+        update.setLong(2, id);
+      }
+      return needUpdate;
+    }
+
+    private static boolean needUpdateForSeparators(@Nullable String moduleUuidPath) {
+      return moduleUuidPath == null || !(moduleUuidPath.startsWith(SEP) && moduleUuidPath.endsWith(SEP));
+    }
 
-  private static String newModuleUuidPath(@Nullable String oldModuleUuidPath) {
-    if (oldModuleUuidPath == null || oldModuleUuidPath.isEmpty()) {
-      return SEP;
-    } else {
-      StringBuilder newModuleUuidPath = new StringBuilder(oldModuleUuidPath);
-      newModuleUuidPath.insert(0, SEP);
+    private static String newModuleUuidPathWithSeparators(@Nullable String oldModuleUuidPath) {
+      if (oldModuleUuidPath == null || oldModuleUuidPath.isEmpty()) {
+        return SEP;
+      } else {
+        StringBuilder newModuleUuidPath = new StringBuilder(oldModuleUuidPath);
+        newModuleUuidPath.insert(0, SEP);
+        newModuleUuidPath.append(SEP);
+        return newModuleUuidPath.toString();
+      }
+    }
+
+    private static boolean needUpdateToIncludeItself(String moduleUuidPath, @Nullable String uuid, @Nullable String scope, @Nullable String qualifier) {
+      return "PRJ".equals(scope) && !("DEV_PRJ".equals(qualifier)) && !(moduleUuidPath.contains(uuid));
+    }
+
+    private static String newModuleUuidPathIncludingItself(String moduleUuidPath, String uuid) {
+      StringBuilder newModuleUuidPath = new StringBuilder(moduleUuidPath);
+      newModuleUuidPath.append(uuid);
       newModuleUuidPath.append(SEP);
       return newModuleUuidPath.toString();
     }
   }
-
 }
index 3f568ad6d415ca0fbda16009b6204c56fd3bf77d..86d58cac2e9f9ba62f3396653ca6ecac6a583f1b 100644 (file)
@@ -2,21 +2,21 @@
 
   <!-- root project -->
   <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
-            uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
+            uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
   <!-- module -->
   <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" deprecated_kee="org.struts:struts-core"
-            uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
+            uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
-  <!-- sub module -->
+  <!-- sub module, already has dots: only itself appended -->
   <projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data" deprecated_kee="org.struts:struts-data"
-            uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
+            uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH.FGHI."
             scope="PRJ" qualifier="BRC" long_name="Struts Data"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
+  <!-- view -->
+  <projects id="6" root_id="[null]" scope="PRJ" qualifier="VW" kee="Teams" name="Teams" deprecated_kee="Teams"
+            uuid="MEAT" project_uuid="MEAT" module_uuid="[null]" module_uuid_path=".MEAT."
+            description="the description" long_name="Teams"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- sub-view -->
+  <projects id="7" root_id="6" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+            uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path=".MEAT.PLAT."
+            description="the description" long_name="Platform Team"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- view technical project - unchanged -->
+  <projects id="8" root_id="6" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+            uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
+            description="the description" long_name="Platform Team"
+            enabled="[true]" language="[null]" copy_resource_id="42" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- root project already has dots, appending itself -->
+  <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+            uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path=".WDOT."
+            description="the description" long_name="Sample"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
   <!-- root project with module_uuid_path NULL -->
   <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
-            uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="."
+            uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path=".DCBA."
             description="the description" long_name="Sample"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
+  <!-- developer -->
+  <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+            uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=".VADR."
+            description="the description" long_name="Anakin Skywalker"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- developer technical project, with dots - unchanged -->
+  <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+            uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
+            description="the description" long_name="Executor Star Dreadnaught"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
 </dataset>
index 1a99736dfd96995c8f698c1b964acba2fb104f40..355ec9308e7fe79df03046cfb65afe788772acad 100644 (file)
@@ -14,9 +14,9 @@
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
-  <!-- sub module -->
+  <!-- sub module, already has dots: only itself appended -->
   <projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data" deprecated_kee="org.struts:struts-data"
-            uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path="ABCD.EFGH"
+            uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Data"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
+  <!-- view -->
+  <projects id="6" root_id="[null]" scope="PRJ" qualifier="VW" kee="Teams" name="Teams" deprecated_kee="Teams"
+            uuid="MEAT" project_uuid="MEAT" module_uuid="[null]" module_uuid_path=""
+            description="the description" long_name="Teams"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- sub-view -->
+  <projects id="7" root_id="6" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+            uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path="MEAT"
+            description="the description" long_name="Platform Team"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- view technical project, already has dots - unchanged -->
+  <projects id="8" root_id="6" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+            uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
+            description="the description" long_name="Platform Team"
+            enabled="[true]" language="[null]" copy_resource_id="42" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- root project already has dots, appending itself -->
+  <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+            uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path="."
+            description="the description" long_name="Sample"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
   <!-- root project with module_uuid_path NULL -->
   <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
             uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="[null]"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
+  <!-- developer -->
+  <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+            uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=""
+            description="the description" long_name="Anakin Skywalker"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- developer technical project, with dots - unchanged -->
+  <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+            uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
+            description="the description" long_name="Executor Star Dreadnaught"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
 </dataset>
index 3f568ad6d415ca0fbda16009b6204c56fd3bf77d..4455653fdfdb453bfe62f3cd0d14ed03d047e9e1 100644 (file)
@@ -2,21 +2,21 @@
 
   <!-- root project -->
   <projects id="1" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.struts:struts" name="Struts" deprecated_kee="org.struts:struts"
-            uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path="."
+            uuid="ABCD" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
             description="the description" long_name="Apache Struts"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
   <!-- module -->
   <projects id="2" root_id="1" kee="org.struts:struts-core" name="Struts Core" deprecated_kee="org.struts:struts-core"
-            uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD."
+            uuid="EFGH" project_uuid="ABCD" module_uuid="[null]" module_uuid_path=".ABCD.EFGH."
             scope="PRJ" qualifier="BRC" long_name="Struts Core"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
   <!-- sub module -->
   <projects id="3" root_id="1" kee="org.struts:struts-data" name="Struts Data" deprecated_kee="org.struts:struts-data"
-            uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH."
+            uuid="FGHI" project_uuid="ABCD" module_uuid="EFGH" module_uuid_path=".ABCD.EFGH.FGHI."
             scope="PRJ" qualifier="BRC" long_name="Struts Data"
             description="[null]" enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
             enabled="[true]" language="java" copy_resource_id="[null]" person_id="[null]" path="src/org/struts/RequestContext.java"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
+  <!-- view -->
+  <projects id="6" root_id="[null]" scope="PRJ" qualifier="VW" kee="Teams" name="Teams" deprecated_kee="Teams"
+            uuid="MEAT" project_uuid="MEAT" module_uuid="[null]" module_uuid_path=".MEAT."
+            description="the description" long_name="Teams"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- sub-view -->
+  <projects id="7" root_id="[null]" scope="PRJ" qualifier="SVW" kee="Platform_Team" name="Platform Team" deprecated_kee="Platform_Team"
+            uuid="PLAT" project_uuid="MEAT" module_uuid="MEAT" module_uuid_path=".MEAT.PLAT."
+            description="the description" long_name="Platform Team"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- view technical project, already has dots - unchanged -->
+  <projects id="8" root_id="[null]" scope="FIL" qualifier="TRK" kee="Platform_Team:sonarqube" name="SonarQube" deprecated_kee="Platform_Team:sonarqube"
+            uuid="SNQB" project_uuid="PLAT" module_uuid="PLAT" module_uuid_path=".MEAT.PLAT."
+            description="the description" long_name="Platform Team"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- root project already has dots, appending itself -->
+  <projects id="9" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
+            uuid="WDOT" project_uuid="WDOT" module_uuid="[null]" module_uuid_path=".WDOT."
+            description="the description" long_name="Sample"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
   <!-- root project with module_uuid_path NULL -->
   <projects id="10" root_id="[null]" scope="PRJ" qualifier="TRK" kee="org.sonar:sample" name="Sample" deprecated_kee="org.sonar:sample"
-            uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path="."
+            uuid="DCBA" project_uuid="DCBA" module_uuid="[null]" module_uuid_path=".DCBA."
             description="the description" long_name="Sample"
             enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
             created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
 
+  <!-- developer -->
+  <projects id="11" root_id="[null]" scope="PRJ" qualifier="DEV" kee="DEV:anakin.skywalker" name="Anakin Skywalker" deprecated_kee="DEV:anakin.skywalker"
+            uuid="VADR" project_uuid="VADR" module_uuid="[null]" module_uuid_path=".VADR."
+            description="the description" long_name="Anakin Skywalker"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="1" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
+  <!-- developer technical project, with dots - unchanged -->
+  <projects id="12" root_id="11" scope="PRJ" qualifier="DEV_PRJ" kee="DEV:anakin.skywalker:Executor" name="Executor Star Dreadnaught" deprecated_kee="DEV:anakin.skywalker:Executor"
+            uuid="EXCT" project_uuid="VADR" module_uuid="VADR" module_uuid_path=".VADR."
+            description="the description" long_name="Executor Star Dreadnaught"
+            enabled="[true]" language="[null]" copy_resource_id="[null]" person_id="[null]" path="[null]"
+            created_at="2008-12-02 13:58:00.00" authorization_updated_at="[null]"/>
+
 </dataset>
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/767_update_projects_module_uuid_path.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/767_update_projects_module_uuid_path.rb
deleted file mode 100644 (file)
index ede79b4..0000000
+++ /dev/null
@@ -1,30 +0,0 @@
-#
-# SonarQube, open source software quality management tool.
-# Copyright (C) 2008-2014 SonarSource
-# mailto:contact AT sonarsource DOT com
-#
-# SonarQube is free software; you can redistribute it and/or
-# modify it under the terms of the GNU Lesser General Public
-# License as published by the Free Software Foundation; either
-# version 3 of the License, or (at your option) any later version.
-#
-# SonarQube is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
-# Lesser General Public License for more details.
-#
-# You should have received a copy of the GNU Lesser General Public License
-# along with this program; if not, write to the Free Software Foundation,
-# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
-#
-
-#
-# SonarQube 5.1
-# SONAR-6054
-#
-class UpdateProjectsModuleUuidPath < ActiveRecord::Migration
-
-  def self.up
-    execute_java_migration('org.sonar.server.db.migrations.v51.UpdateProjectsModuleUuidPath')
-  end
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/790_update_projects_module_uuid_path.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/790_update_projects_module_uuid_path.rb
new file mode 100644 (file)
index 0000000..b25be54
--- /dev/null
@@ -0,0 +1,31 @@
+#
+# SonarQube, open source software quality management tool.
+# Copyright (C) 2008-2014 SonarSource
+# mailto:contact AT sonarsource DOT com
+#
+# SonarQube is free software; you can redistribute it and/or
+# modify it under the terms of the GNU Lesser General Public
+# License as published by the Free Software Foundation; either
+# version 3 of the License, or (at your option) any later version.
+#
+# SonarQube is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+# Lesser General Public License for more details.
+#
+# You should have received a copy of the GNU Lesser General Public License
+# along with this program; if not, write to the Free Software Foundation,
+# Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
+#
+
+#
+# SonarQube 5.1
+# SONAR-6054
+# SONAR-6117
+#
+class UpdateProjectsModuleUuidPath < ActiveRecord::Migration
+
+  def self.up
+    execute_java_migration('org.sonar.server.db.migrations.v51.UpdateProjectsModuleUuidPath')
+  end
+end
index fc7327dbcb6d28952efc78d0f9f881182ea90f70..048e602afe97f641f58c1412527c88c98172579d 100644 (file)
@@ -33,7 +33,7 @@ import java.util.List;
  */
 public class DatabaseVersion implements BatchComponent, ServerComponent {
 
-  public static final int LAST_VERSION = 789;
+  public static final int LAST_VERSION = 790;
 
   /**
    * List of all the tables.n
index eceb883ec31966c314471222017e48013bffc916..af6b0b2df0078a60f79126c21c4d97f993bf4831 100644 (file)
@@ -295,7 +295,6 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('763');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('764');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('765');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('766');
-INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('767');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('768');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('769');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('770');
@@ -317,6 +316,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('786');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('787');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('788');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('789');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('790');
 
 INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT, REMEMBER_TOKEN, REMEMBER_TOKEN_EXPIRES_AT) VALUES (1, 'admin', 'Administrator', '', 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '1418215735482', '1418215735482', null, null);
 ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;