]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-6453 Add columns in the dependencies table 264/head
authorJulien Lancelot <julien.lancelot@sonarsource.com>
Tue, 28 Apr 2015 14:31:19 +0000 (16:31 +0200)
committerJulien Lancelot <julien.lancelot@sonarsource.com>
Wed, 29 Apr 2015 12:12:02 +0000 (14:12 +0200)
12 files changed:
server/sonar-server/src/main/java/org/sonar/server/db/migrations/MigrationSteps.java
server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/AddDependenciesColumns.java [new file with mode: 0644]
server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/AddDependenciesColumnsTest.java [new file with mode: 0644]
server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/AddDependenciesColumnsTest/schema.sql [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/914_add_dependencies_columns.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
sonar-core/src/main/resources/org/sonar/core/persistence/schema-h2.ddl
sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot-result.xml
sonar-core/src/test/resources/org/sonar/core/purge/PurgeCommandsTest/shouldPurgeSnapshot.xml

index c333435dbf5efc30b3c4611dca33c6f0691abdb5..a27a4c4bce5b4f827459dce00b6f7a60e811df25 100644 (file)
@@ -64,6 +64,7 @@ import org.sonar.server.db.migrations.v51.FeedUsersLongDates;
 import org.sonar.server.db.migrations.v51.RemovePermissionsOnModulesMigrationStep;
 import org.sonar.server.db.migrations.v51.RenameComponentRelatedParamsInIssueFilters;
 import org.sonar.server.db.migrations.v51.UpdateProjectsModuleUuidPath;
+import org.sonar.server.db.migrations.v52.AddDependenciesColumns;
 import org.sonar.server.db.migrations.v52.AddDependenciesComponentUuidColumns;
 import org.sonar.server.db.migrations.v52.DropDependenciesComponentColumns;
 import org.sonar.server.db.migrations.v52.FeedDependenciesComponentUuids;
@@ -143,6 +144,7 @@ public interface MigrationSteps {
     AddDependenciesComponentUuidColumns.class,
     FeedDependenciesComponentUuids.class,
     DropDependenciesComponentColumns.class,
-    FeedFileSourcesDataType.class
+    FeedFileSourcesDataType.class,
+    AddDependenciesColumns.class
     );
 }
diff --git a/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/AddDependenciesColumns.java b/server/sonar-server/src/main/java/org/sonar/server/db/migrations/v52/AddDependenciesColumns.java
new file mode 100644 (file)
index 0000000..0389501
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * 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.
+ */
+
+package org.sonar.server.db.migrations.v52;
+
+import org.sonar.core.persistence.Database;
+import org.sonar.server.db.migrations.AddColumnsBuilder;
+import org.sonar.server.db.migrations.DdlChange;
+
+import java.sql.SQLException;
+
+import static org.sonar.server.db.migrations.AddColumnsBuilder.ColumnDef.Type.BIG_INTEGER;
+import static org.sonar.server.db.migrations.AddColumnsBuilder.ColumnDef.Type.STRING;
+
+/**
+ * Add the following columns to the dependencies table :
+ * - from_parent_uuid
+ * - to_parent_uuid
+ * - root_project_snapshot_id
+ * - created_at
+ */
+public class AddDependenciesColumns extends DdlChange {
+
+  private final Database db;
+
+  public AddDependenciesColumns(Database db) {
+    super(db);
+    this.db = db;
+  }
+
+  @Override
+  public void execute(Context context) throws SQLException {
+    context.execute(generateSql());
+  }
+
+  private String generateSql() {
+    return new AddColumnsBuilder(db.getDialect(), "dependencies")
+      .addColumn(
+        new AddColumnsBuilder.ColumnDef()
+          .setName("from_parent_uuid")
+          .setType(STRING)
+          .setLimit(50)
+          .setNullable(true)
+      )
+      .addColumn(
+        new AddColumnsBuilder.ColumnDef()
+          .setName("to_parent_uuid")
+          .setType(STRING)
+          .setLimit(50)
+          .setNullable(true)
+      )
+      .addColumn(
+        new AddColumnsBuilder.ColumnDef()
+          .setName("root_project_snapshot_id")
+          .setType(BIG_INTEGER)
+          .setNullable(true)
+      )
+      .addColumn(
+        new AddColumnsBuilder.ColumnDef()
+          .setName("created_at")
+          .setType(BIG_INTEGER)
+          .setNullable(true)
+      )
+      .build();
+  }
+
+}
diff --git a/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/AddDependenciesColumnsTest.java b/server/sonar-server/src/test/java/org/sonar/server/db/migrations/v52/AddDependenciesColumnsTest.java
new file mode 100644 (file)
index 0000000..c95338d
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+ * 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.
+ */
+
+package org.sonar.server.db.migrations.v52;
+
+import org.junit.Before;
+import org.junit.ClassRule;
+import org.junit.Test;
+import org.sonar.core.persistence.DbTester;
+
+import java.sql.Types;
+
+public class AddDependenciesColumnsTest {
+
+  @ClassRule
+  public static DbTester db = new DbTester().schema(AddDependenciesColumnsTest.class, "schema.sql");
+
+  AddDependenciesColumns migration;
+
+  @Before
+  public void setUp() throws Exception {
+    migration = new AddDependenciesColumns(db.database());
+  }
+
+  @Test
+  public void update_columns() throws Exception {
+    migration.execute();
+
+    db.assertColumnDefinition("dependencies", "from_parent_uuid", Types.VARCHAR, 50);
+    db.assertColumnDefinition("dependencies", "to_parent_uuid", Types.VARCHAR, 50);
+    db.assertColumnDefinition("dependencies", "created_at", Types.BIGINT, null);
+  }
+
+}
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/AddDependenciesColumnsTest/schema.sql b/server/sonar-server/src/test/resources/org/sonar/server/db/migrations/v52/AddDependenciesColumnsTest/schema.sql
new file mode 100644 (file)
index 0000000..25e850f
--- /dev/null
@@ -0,0 +1,13 @@
+CREATE TABLE "DEPENDENCIES" (
+  "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
+  "FROM_SNAPSHOT_ID" INTEGER,
+  "FROM_COMPONENT_UUID" INTEGER,
+  "TO_SNAPSHOT_ID" INTEGER,
+  "TO_COMPONENT_UUID" INTEGER,
+  "DEP_USAGE" VARCHAR(30),
+  "DEP_WEIGHT" INTEGER,
+  "PROJECT_SNAPSHOT_ID" INTEGER,
+  "PARENT_DEPENDENCY_ID" BIGINT,
+  "FROM_SCOPE" VARCHAR(3),
+  "TO_SCOPE" VARCHAR(3)
+);
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/914_add_dependencies_columns.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/914_add_dependencies_columns.rb
new file mode 100644 (file)
index 0000000..9ca6107
--- /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.2
+# SONAR-6256
+#
+class AddDependenciesColumns < ActiveRecord::Migration
+
+  def self.up
+    execute_java_migration('org.sonar.server.db.migrations.v52.AddDependenciesColumns')
+  end
+
+end
index 2ba0d7afbba02fd57ebc948601d88b943572eb69..440c39d105279e1c707bf360f1d34c05a527e528 100644 (file)
@@ -33,7 +33,7 @@ import java.util.List;
  */
 public class DatabaseVersion implements BatchComponent, ServerComponent {
 
-  public static final int LAST_VERSION = 913;
+  public static final int LAST_VERSION = 914;
 
   /**
    * List of all the tables.n
index 8c2c12a0befa23e85910b58c4640364c451b03dc..92a6baa5be69e16e04b47cb7c15497c65fe2a604 100644 (file)
@@ -337,6 +337,7 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('910');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('911');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('912');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('913');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('914');
 
 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;
index ade0db0a4a0cf10246d396450627e3200bf12305..ff932e6131e4dc8fbaccd4b821dc135bdc9bf6db 100644 (file)
@@ -7,14 +7,18 @@ CREATE TABLE "DEPENDENCIES" (
   "ID" BIGINT NOT NULL GENERATED BY DEFAULT AS IDENTITY (START WITH 1, INCREMENT BY 1),
   "FROM_SNAPSHOT_ID" INTEGER,
   "FROM_COMPONENT_UUID" VARCHAR(50),
+  "FROM_PARENT_UUID" VARCHAR(50),
   "TO_SNAPSHOT_ID" INTEGER,
   "TO_COMPONENT_UUID" VARCHAR(50),
+  "TO_PARENT_UUID" VARCHAR(50),
   "DEP_USAGE" VARCHAR(30),
   "DEP_WEIGHT" INTEGER,
   "PROJECT_SNAPSHOT_ID" INTEGER,
+  "ROOT_PROJECT_SNAPSHOT_ID" INTEGER,
   "PARENT_DEPENDENCY_ID" BIGINT,
   "FROM_SCOPE" VARCHAR(3),
-  "TO_SCOPE" VARCHAR(3)
+  "TO_SCOPE" VARCHAR(3),
+  "CREATED_AT" BIGINT
 );
 
 CREATE TABLE "CHARACTERISTICS" (
index 286d4dd8447fdf681d5441a47bdca2f5a7127ff0..7a00cb1ef99cbdc34eabc636a885aa844ec2f2c9 100644 (file)
@@ -22,9 +22,9 @@
                     person_id="[null]"
                     text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
                     alert_status="[null]" description="[null]" measure_data="[null]"/>
-  <dependencies id="1" from_component_uuid="A" from_snapshot_id="1" to_component_uuid="CC" to_snapshot_id="30"
-                parent_dependency_id="[null]" project_snapshot_id="1"
-                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
+  <dependencies id="1" from_component_uuid="A" from_parent_uuid="P_A" from_snapshot_id="1" to_component_uuid="CC" to_parent_uuid="P_CC" to_snapshot_id="30"
+                parent_dependency_id="[null]" project_snapshot_id="1" root_project_snapshot_id="1"
+                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>
   <events id="1" name="Version 1.0" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]"
           event_date="1228222680000" created_at="1228222680000" event_data="[null]"/>
   <duplications_index id="1" project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0"
index a6280de86f87602260dd6f1d146cb5a9c4dc9397..16691800d77da41335d55a8d441513b651fd236a 100644 (file)
@@ -21,9 +21,9 @@
                     person_id="[null]"
                     text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
                     alert_status="[null]" description="[null]" measure_data="[null]"/>
-  <dependencies id="1" from_component_uuid="A" from_snapshot_id="1" to_component_uuid="CC" to_snapshot_id="30"
-                parent_dependency_id="[null]" project_snapshot_id="1"
-                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
+  <dependencies id="1" from_component_uuid="A" from_parent_uuid="P_A" from_snapshot_id="1" to_component_uuid="CC" to_parent_uuid="P_CC" to_snapshot_id="30"
+                parent_dependency_id="[null]" project_snapshot_id="1" root_project_snapshot_id="1"
+                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>
   <events id="1" name="Version 1.0" component_uuid="1" snapshot_id="1" category="VERSION" description="[null]"
           event_date="1228222680000" created_at="1228222680000" event_data="[null]"/>
   <duplications_index id="1" project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0"
                     person_id="[null]"
                     text_value="[null]" tendency="[null]" measure_date="[null]" project_id="[null]"
                     alert_status="[null]" description="[null]" measure_data="[null]"/>
-  <dependencies id="2" from_component_uuid="AA" from_snapshot_id="10" to_component_uuid="E" to_snapshot_id="5"
-                parent_dependency_id="[null]" project_snapshot_id="5"
-                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
-  <dependencies id="3" from_component_uuid="C" from_snapshot_id="5" to_component_uuid="CCC" to_snapshot_id="300"
-                parent_dependency_id="[null]" project_snapshot_id="5"
-                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
+  <dependencies id="2" from_component_uuid="AA" from_parent_uuid="P_AA" from_snapshot_id="10" to_component_uuid="E" to_parent_uuid="P_EE" to_snapshot_id="5"
+                parent_dependency_id="[null]" project_snapshot_id="5" root_project_snapshot_id="5"
+                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>
+  <dependencies id="3" from_component_uuid="C" from_parent_uuid="P_C" from_snapshot_id="5" to_component_uuid="CCC" to_parent_uuid="P_CCC" to_snapshot_id="300"
+                parent_dependency_id="[null]" project_snapshot_id="5" root_project_snapshot_id="5"
+                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>
   <events id="2" name="Version 1.0" component_uuid="5" snapshot_id="5" category="VERSION" description="[null]"
           event_date="1228222680000" created_at="1228222680000" event_data="[null]"/>
   <duplications_index id="2" project_snapshot_id="5" snapshot_id="5" hash="bb" index_in_file="0" start_line="0"
index 1a70186c778fead79907fb0eaadddb59390271b8..e630296526ca2d0af691bce1980163ea5f0829f1 100644 (file)
@@ -33,13 +33,13 @@ Note that measures, events and reviews are not deleted.
                     text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
                     description="[null]" measure_data="[null]"/>
 
-  <!--<dependencies id="1" from_resource_id="1" from_component_uuid="A" from_snapshot_id="1" to_resource_id="2" to_component_uuid="B" to_snapshot_id="2"-->
-  <!--parent_dependency_id="[null]" project_snapshot_id="[null]"-->
-  <!--dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>-->
+  <!--<dependencies id="1" from_component_uuid="A" from_parent_uuid="P_A" from_snapshot_id="1" to_component_uuid="B" to_parent_uuid="P_B" to_snapshot_id="2"-->
+                <!--parent_dependency_id="[null]" project_snapshot_id="[null]" root_project_snapshot_id="[null]"-->
+                <!--dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>-->
 
-  <!--<dependencies id="2" from_resource_id="3" from_component_uuid="C" from_snapshot_id="3" to_resource_id="1" to_component_uuid="A" to_snapshot_id="1"-->
-  <!--parent_dependency_id="[null]" project_snapshot_id="2"-->
-  <!--dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>-->
+  <!--<dependencies id="2" from_component_uuid="C" from_parent_uuid="P_C" from_snapshot_id="3" to_component_uuid="A" to_parent_uuid="P_A" to_snapshot_id="1"-->
+                <!--parent_dependency_id="[null]" project_snapshot_id="2" root_project_snapshot_id="1"-->
+                <!--dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ" created_at="1228222680000"/>-->
 
   <events id="1" component_uuid="1" snapshot_id="1"
           category="VERSION" description="[null]" name="Version 1.0" event_date="1228222680000"
@@ -72,13 +72,13 @@ Note that measures, events and reviews are not deleted.
                     text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
                     description="[null]" measure_data="[null]"/>
 
-  <dependencies id="3" from_component_uuid="CC" from_snapshot_id="33" to_component_uuid="DD" to_snapshot_id="44"
-                parent_dependency_id="[null]" project_snapshot_id="[null]"
-                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
+  <dependencies id="3" from_component_uuid="CC" from_parent_uuid="P_CC" from_snapshot_id="33" to_component_uuid="DD" to_parent_uuid="P_DD" to_snapshot_id="44"
+                parent_dependency_id="[null]" project_snapshot_id="[null]" root_project_snapshot_id="[null]"
+                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>
 
-  <dependencies id="4" from_component_uuid="EE" from_snapshot_id="55" to_component_uuid="FF" to_snapshot_id="66"
-                parent_dependency_id="[null]" project_snapshot_id="2"
-                dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
+  <dependencies id="4" from_component_uuid="EE" from_parent_uuid="P_EE" from_snapshot_id="55" to_component_uuid="FF" to_parent_uuid="P_FF" to_snapshot_id="66"
+                parent_dependency_id="[null]" project_snapshot_id="2" root_project_snapshot_id="1"
+                dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ" created_at="1228222680000"/>
 
   <events id="2" component_uuid="2" snapshot_id="2"
           category="VERSION" description="[null]" name="Version 1.0" event_date="1228222680000"
index 2aa70e077c01448f3bedef8711f058f195cb04af..29bae6354c0946815e800b58858c85a086f048fc 100644 (file)
                     tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"
                     measure_data="[null]"/>
 
-  <dependencies id="1" from_component_uuid="A" from_snapshot_id="1" to_component_uuid="B" to_snapshot_id="2"
-                parent_dependency_id="[null]" project_snapshot_id="[null]"
-                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
+  <dependencies id="1" from_component_uuid="A" from_parent_uuid="P_A" from_snapshot_id="1" to_component_uuid="B" to_parent_uuid="P_B" to_snapshot_id="2"
+                parent_dependency_id="[null]" project_snapshot_id="[null]" root_project_snapshot_id="[null]"
+                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>
 
-  <dependencies id="2" from_component_uuid="C" from_snapshot_id="3" to_component_uuid="A" to_snapshot_id="1"
-                parent_dependency_id="[null]" project_snapshot_id="2"
-                dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
+  <dependencies id="2" from_component_uuid="C" from_parent_uuid="P_C" from_snapshot_id="3" to_component_uuid="A" to_parent_uuid="P_A" to_snapshot_id="1"
+                parent_dependency_id="[null]" project_snapshot_id="2" root_project_snapshot_id="1"
+                dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ" created_at="1228222680000"/>
 
   <events id="1" component_uuid="1" snapshot_id="1"
           category="VERSION" description="[null]" name="Version 1.0" event_date="1228222680000"
                     text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
                     description="[null]" measure_data="[null]"/>
 
-  <dependencies id="3" from_component_uuid="CC" from_snapshot_id="33" to_component_uuid="DD" to_snapshot_id="44"
-                parent_dependency_id="[null]" project_snapshot_id="[null]"
-                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
+  <dependencies id="3" from_component_uuid="CC" from_parent_uuid="P_CC" from_snapshot_id="33" to_component_uuid="DD" to_parent_uuid="P_DD" to_snapshot_id="44"
+                parent_dependency_id="[null]" project_snapshot_id="[null]" root_project_snapshot_id="[null]"
+                dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB" created_at="1228222680000"/>
 
-  <dependencies id="4" from_component_uuid="EE" from_snapshot_id="55" to_component_uuid="FF" to_snapshot_id="66"
-                parent_dependency_id="[null]" project_snapshot_id="2"
-                dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
+  <dependencies id="4" from_component_uuid="EE" from_parent_uuid="P_EE" from_snapshot_id="55" to_component_uuid="FF" to_parent_uuid="P_FF" to_snapshot_id="66"
+                parent_dependency_id="[null]" project_snapshot_id="2" root_project_snapshot_id="1"
+                dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ" created_at="1228222680000"/>
 
   <events id="2" component_uuid="2" snapshot_id="2"
           category="VERSION" description="[null]" name="Version 1.0" event_date="1228222680000"