]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-5817 remove snapshot_sources use during purge and snapshot delete
authorTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Thu, 4 Dec 2014 08:36:57 +0000 (09:36 +0100)
committerTeryk Bellahsene <teryk.bellahsene@sonarsource.com>
Thu, 4 Dec 2014 08:41:46 +0000 (09:41 +0100)
sonar-core/src/main/java/org/sonar/core/purge/PurgeCommands.java
sonar-core/src/main/java/org/sonar/core/purge/PurgeMapper.java
sonar-core/src/main/resources/org/sonar/core/purge/PurgeMapper.xml
sonar-core/src/test/java/org/sonar/core/purge/PurgeCommandsTest.java
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 a68c3fa58ceb40fa501050ad9801aa405c078da6..3bdb2248a16255238f09793e9028eb4b87832f77 100644 (file)
@@ -180,8 +180,6 @@ class PurgeCommands {
     session.commit();
     profiler.stop();
 
-    deleteSnapshotSources(snapshotIdsPartition);
-
     deleteSnapshotGraphs(snapshotIdsPartition);
 
     deleteSnapshotData(snapshotIdsPartition);
@@ -207,8 +205,6 @@ class PurgeCommands {
 
     deleteSnapshotDuplications(snapshotIdsPartition);
 
-    deleteSnapshotSources(snapshotIdsPartition);
-
     deleteSnapshotGraphs(snapshotIdsPartition);
 
     deleteSnapshotData(snapshotIdsPartition);
@@ -247,15 +243,6 @@ class PurgeCommands {
     profiler.stop();
   }
 
-  private void deleteSnapshotSources(final List<List<Long>> snapshotIdsPartition) {
-    profiler.start("deleteSnapshotSource (snapshot_sources)");
-    for (List<Long> partSnapshotIds : snapshotIdsPartition) {
-      purgeMapper.deleteSnapshotSource(partSnapshotIds);
-    }
-    session.commit();
-    profiler.stop();
-  }
-
   private void deleteSnapshotDuplications(final List<List<Long>> snapshotIdsPartition) {
     profiler.start("deleteSnapshotDuplications (duplications_index)");
     for (List<Long> partSnapshotIds : snapshotIdsPartition) {
index a31a2abd2b9d9bc3abe38e7c21e42a59858ce2c5..4ece70e8e4a90b912c675783f6f7ef6cab221429 100644 (file)
@@ -48,8 +48,6 @@ public interface PurgeMapper {
 
   void deleteSnapshotMeasures(@Param("snapshotIds") List<Long> snapshotIds);
 
-  void deleteSnapshotSource(@Param("snapshotIds") List<Long> snapshotIds);
-
   void deleteSnapshotGraphs(@Param("snapshotIds") List<Long> snapshotIds);
 
   void deleteSnapshotData(@Param("snapshotIds") List<Long> snapshotIds);
index 6134cde6f24223f8d14cfaecd233913e56e85238..70acfa0df27297130b93514f8832b0c596fe1075 100644 (file)
     </foreach>
   </delete>
 
-  <delete id="deleteSnapshotSource" parameterType="map">
-    delete from snapshot_sources where snapshot_id in
-    <foreach collection="snapshotIds" open="(" close=")" item="snapshotId" separator=",">
-      #{snapshotId}
-    </foreach>
-  </delete>
-
   <delete id="deleteSnapshotGraphs" parameterType="map">
     delete from graphs where snapshot_id in
     <foreach collection="snapshotIds" open="(" close=")" item="snapshotId" separator=",">
index 8bf3763296686c989252d89ccc792a0eb939fd30..704c13903db64ccf87ef091a23adb1cb1e27f53e 100644 (file)
@@ -53,7 +53,7 @@ public class PurgeCommandsTest extends AbstractDaoTestCase {
       MyBatis.closeQuietly(session);
     }
     checkTables("shouldDeleteSnapshot",
-      "snapshots", "project_measures", "snapshot_sources", "duplications_index", "events", "dependencies", "snapshot_data");
+      "snapshots", "project_measures", "duplications_index", "events", "dependencies", "snapshot_data");
   }
 
   /**
@@ -84,7 +84,7 @@ public class PurgeCommandsTest extends AbstractDaoTestCase {
       MyBatis.closeQuietly(session);
     }
     checkTables("shouldPurgeSnapshot",
-      "snapshots", "project_measures", "snapshot_sources", "duplications_index", "events", "dependencies", "snapshot_data");
+      "snapshots", "project_measures", "duplications_index", "events", "dependencies", "snapshot_data");
   }
 
   @Test
index d2aaf6dba2848559a8939306c2d97ed352c67bce..d2711e0850641549b8fe2d26cf7e26565d07496c 100644 (file)
@@ -13,7 +13,6 @@
              parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]" status="P" islast="[false]"
              path="[null]"/>
 
-  <snapshot_sources ID="1" SNAPSHOT_ID="1" DATA="foo" UPDATED_AT="[null]"/>
   <project_measures ID="1" characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]"
                     variation_value_3="[null]" variation_value_4="[null]"
                     variation_value_5="[null]"
@@ -28,7 +27,9 @@
                 dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
   <events id="1" name="Version 1.0" resource_id="1" snapshot_id="1" category="VERSION" description="[null]"
           event_date="2008-12-02 13:58:00.00" created_at="[null]" event_data="[null]"/>
-  <duplications_index id="1" project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0" end_line="0"/>
-  <snapshot_data id="1" resource_id="1" snapshot_id="1" snapshot_data="0,10,k" data_type="highlight_syntax" created_at="[null]" updated_at="[null]" />
+  <duplications_index id="1" project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0"
+                      end_line="0"/>
+  <snapshot_data id="1" resource_id="1" snapshot_id="1" snapshot_data="0,10,k" data_type="highlight_syntax"
+                 created_at="[null]" updated_at="[null]"/>
 
 </dataset>
index 501a124192cf21eeaef31b92f6078f85a6b13f10..2ff3064a175fd8a5af27d1f3faa548d022747e03 100644 (file)
@@ -8,10 +8,10 @@
              period3_mode="[null]" period3_param="[null]" period3_date="[null]"
              period4_mode="[null]" period4_param="[null]" period4_date="[null]"
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
-             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+             build_date="2008-12-02 13:58:00.00"
              version="[null]" path="[null]"/>
 
-  <snapshot_sources ID="1" SNAPSHOT_ID="1" DATA="foo"/>
   <project_measures ID="1" characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]"
                     variation_value_3="[null]" variation_value_4="[null]"
                     variation_value_5="[null]"
                 dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
   <events id="1" name="Version 1.0" resource_id="1" snapshot_id="1" category="VERSION" description="[null]"
           event_date="2008-12-02 13:58:00.00" created_at="[null]" event_data="[null]"/>
-  <duplications_index id="1" project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0" end_line="0"/>
-  <snapshot_data id="1" resource_id="1" snapshot_id="1" snapshot_data="0,10,k" data_type="highlight_syntax" created_at="[null]" updated_at="[null]" />
+  <duplications_index id="1" project_snapshot_id="1" snapshot_id="1" hash="bb" index_in_file="0" start_line="0"
+                      end_line="0"/>
+  <snapshot_data id="1" resource_id="1" snapshot_id="1" snapshot_data="0,10,k" data_type="highlight_syntax"
+                 created_at="[null]" updated_at="[null]"/>
 
 
-    <!-- snapshot to remove, id 5 on resource 5-->
+  <!-- snapshot to remove, id 5 on resource 5-->
   <snapshots id="5" project_id="5" parent_snapshot_id="[null]" root_project_id="[null]" root_snapshot_id="[null]"
              status="P" islast="[true]" purge_status="[null]"
              period1_mode="[null]" period1_param="[null]" period1_date="[null]"
              period3_mode="[null]" period3_param="[null]" period3_date="[null]"
              period4_mode="[null]" period4_param="[null]" period4_date="[null]"
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
-             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00"
+             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+             build_date="2008-12-02 13:58:00.00"
              version="[null]" path="[null]"/>
 
-  <snapshot_sources ID="2" SNAPSHOT_ID="5" DATA="foo"/>
   <project_measures ID="2" characteristic_id="[null]" url="[null]" variation_value_1="[null]" variation_value_2="[null]"
                     variation_value_3="[null]" variation_value_4="[null]"
                     variation_value_5="[null]"
                 dep_usage="USES" dep_weight="1" from_scope="PRJ" to_scope="LIB"/>
   <events id="2" name="Version 1.0" resource_id="5" snapshot_id="5" category="VERSION" description="[null]"
           event_date="2008-12-02 13:58:00.00" created_at="[null]" event_data="[null]"/>
-  <duplications_index id="2" project_snapshot_id="5" snapshot_id="5" hash="bb" index_in_file="0" start_line="0" end_line="0"/>
-  <snapshot_data id="2" resource_id="5" snapshot_id="5" snapshot_data="0,10,k" data_type="highlight_syntax" created_at="[null]" updated_at="[null]" />
+  <duplications_index id="2" project_snapshot_id="5" snapshot_id="5" hash="bb" index_in_file="0" start_line="0"
+                      end_line="0"/>
+  <snapshot_data id="2" resource_id="5" snapshot_id="5" snapshot_data="0,10,k" data_type="highlight_syntax"
+                 created_at="[null]" updated_at="[null]"/>
 
 
 </dataset>
index 3144614ec5246b386b69bf3d3bdce74ab94a2bfe..d48051136b5839d3b2fcab28d0dd637eba819832 100644 (file)
@@ -16,9 +16,8 @@ Note that measures, events and reviews are not deleted.
              period3_mode="[null]" period3_param="[null]" period3_date="[null]"
              period4_mode="[null]" period4_param="[null]" period4_date="[null]"
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
-             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
-
-  <!--<snapshot_sources ID="1" SNAPSHOT_ID="1" DATA="foo"/>-->
+             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+             build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
 
   <!--switched_off="[null]" permanent_id="[null]" RULE_ID="1" FAILURE_LEVEL="2"-->
   <!--MESSAGE="msg1" LINE="[null]" COST="[null]"-->
@@ -26,10 +25,13 @@ Note that measures, events and reviews are not deleted.
   <!--checksum="[null]" person_id="[null]"/>-->
 
   <project_measures ID="1" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]"
-                    url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
-                    variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1" rules_category_id="[null]"
+                    url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+                    variation_value_4="[null]"
+                    variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1"
+                    rules_category_id="[null]"
                     person_id="[null]"
-                    text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/>
+                    text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+                    description="[null]" measure_data="[null]"/>
 
   <!--<dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="2" to_snapshot_id="2"-->
   <!--parent_dependency_id="[null]" project_snapshot_id="[null]"-->
@@ -40,7 +42,8 @@ Note that measures, events and reviews are not deleted.
   <!--dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>-->
 
   <events id="1" resource_id="1" snapshot_id="1"
-          category="VERSION" description="[null]" name="Version 1.0" event_date="2008-12-02 13:58:00.00" created_at="[null]"
+          category="VERSION" description="[null]" name="Version 1.0" event_date="2008-12-02 13:58:00.00"
+          created_at="[null]"
           event_data="[null]"/>
 
   <!--<duplications_index id="1" project_snapshot_id="1" snapshot_id="1"-->
@@ -56,15 +59,18 @@ Note that measures, events and reviews are not deleted.
              period3_mode="[null]" period3_param="[null]" period3_date="[null]"
              period4_mode="[null]" period4_param="[null]" period4_date="[null]"
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
-             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
+             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+             build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
 
-  <snapshot_sources ID="2" SNAPSHOT_ID="2" DATA="foo" UPDATED_AT="[null]"/>
 
   <project_measures ID="2" project_id="2" SNAPSHOT_ID="2" RULE_ID="[null]" characteristic_id="[null]"
-                    url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
-                    variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1" rules_category_id="[null]"
+                    url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+                    variation_value_4="[null]"
+                    variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1"
+                    rules_category_id="[null]"
                     person_id="[null]"
-                    text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/>
+                    text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+                    description="[null]" measure_data="[null]"/>
 
   <dependencies id="3" from_resource_id="33" from_snapshot_id="33" to_resource_id="44" to_snapshot_id="44"
                 parent_dependency_id="[null]" project_snapshot_id="[null]"
@@ -75,12 +81,14 @@ Note that measures, events and reviews are not deleted.
                 dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
 
   <events id="2" resource_id="2" snapshot_id="2"
-          category="VERSION" description="[null]" name="Version 1.0" event_date="2008-12-02 13:58:00.00" created_at="[null]"
+          category="VERSION" description="[null]" name="Version 1.0" event_date="2008-12-02 13:58:00.00"
+          created_at="[null]"
           event_data="[null]"/>
 
   <duplications_index id="2" project_snapshot_id="2" snapshot_id="2"
                       hash="bb" index_in_file="0" start_line="0" end_line="0"/>
 
-  <snapshot_data id="2" resource_id="5" snapshot_id="5" snapshot_data="0,10,k" data_type="highlight_syntax" created_at="[null]" updated_at="[null]" />
+  <snapshot_data id="2" resource_id="5" snapshot_id="5" snapshot_data="0,10,k" data_type="highlight_syntax"
+                 created_at="[null]" updated_at="[null]"/>
 
 </dataset>
index 5b651f5ea327cea6b32d724458d114cb17d0bfaf..262efa6af051e8bcbfa1800c2a8f698309a6de91 100644 (file)
@@ -8,15 +8,15 @@
              period3_mode="[null]" period3_param="[null]" period3_date="[null]"
              period4_mode="[null]" period4_param="[null]" period4_date="[null]"
              period5_mode="[null]" period5_param="[null]" period5_date="[null]"
-             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
-
-  <snapshot_sources ID="1" SNAPSHOT_ID="1" DATA="foo"/>
+             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+             build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
 
   <project_measures ID="1" project_id="1" SNAPSHOT_ID="1" RULE_ID="[null]" characteristic_id="[null]"
-                    url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
-                    variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1" rules_category_id="[null]"
-                    person_id="[null]"
-                    text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/>
+                    url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+                    variation_value_4="[null]" variation_value_5="[null]" rule_priority="[null]" alert_text="[null]"
+                    VALUE="10.0" METRIC_ID="1" rules_category_id="[null]" person_id="[null]" text_value="[null]"
+                    tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]"
+                    measure_data="[null]"/>
 
   <dependencies id="1" from_resource_id="1" from_snapshot_id="1" to_resource_id="2" to_snapshot_id="2"
                 parent_dependency_id="[null]" project_snapshot_id="[null]"
                 dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
 
   <events id="1" resource_id="1" snapshot_id="1"
-          category="VERSION" description="[null]" name="Version 1.0" event_date="2008-12-02 13:58:00.00" created_at="[null]"
+          category="VERSION" description="[null]" name="Version 1.0" event_date="2008-12-02 13:58:00.00"
+          created_at="[null]"
           event_data="[null]"/>
 
   <duplications_index id="1" project_snapshot_id="1" snapshot_id="1"
                       hash="bb" index_in_file="0" start_line="0" end_line="0"/>
 
-  <snapshot_data id="1" resource_id="1" snapshot_id="1" snapshot_data="0,10,k" data_type="highlight_syntax" created_at="[null]" updated_at="[null]" />
+  <snapshot_data id="1" resource_id="1" snapshot_id="1" snapshot_data="0,10,k" data_type="highlight_syntax"
+                 created_at="[null]" updated_at="[null]"/>
 
 
   <!-- The following is not purged but is kept for DBUnit -->
   <snapshots id="2"
-               project_id="2" parent_snapshot_id="[null]" root_project_id="2" root_snapshot_id="[null]"
-               status="P" islast="[false]" purge_status="1"
-               period1_mode="[null]" period1_param="[null]" period1_date="[null]"
-               period2_mode="[null]" period2_param="[null]" period2_date="[null]"
-               period3_mode="[null]" period3_param="[null]" period3_date="[null]"
-               period4_mode="[null]" period4_param="[null]" period4_date="[null]"
-               period5_mode="[null]" period5_param="[null]" period5_date="[null]"
-               depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00" build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
-
-    <snapshot_sources ID="2" SNAPSHOT_ID="2" DATA="foo"/>
-
-    <project_measures ID="2" project_id="2" SNAPSHOT_ID="2" RULE_ID="[null]" characteristic_id="[null]"
-                      url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]" variation_value_4="[null]"
-                      variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1" rules_category_id="[null]"
-                      person_id="[null]"
-                      text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]" description="[null]" measure_data="[null]"/>
-
-    <dependencies id="3" from_resource_id="33" from_snapshot_id="33" to_resource_id="44" 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="4" from_resource_id="55" from_snapshot_id="55" to_resource_id="66" to_snapshot_id="66"
-                  parent_dependency_id="[null]" project_snapshot_id="2"
-                  dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
-
-    <events id="2" resource_id="2" snapshot_id="2"
-            category="VERSION" description="[null]" name="Version 1.0" event_date="2008-12-02 13:58:00.00" created_at="[null]"
-            event_data="[null]"/>
-
-    <duplications_index id="2" project_snapshot_id="2" snapshot_id="2"
-                        hash="bb" index_in_file="0" start_line="0" end_line="0"/>
-
-    <snapshot_data id="2" resource_id="5" snapshot_id="5" snapshot_data="0,10,k" data_type="highlight_syntax" created_at="[null]" updated_at="[null]" />
+             project_id="2" parent_snapshot_id="[null]" root_project_id="2" root_snapshot_id="[null]"
+             status="P" islast="[false]" purge_status="1"
+             period1_mode="[null]" period1_param="[null]" period1_date="[null]"
+             period2_mode="[null]" period2_param="[null]" period2_date="[null]"
+             period3_mode="[null]" period3_param="[null]" period3_date="[null]"
+             period4_mode="[null]" period4_param="[null]" period4_date="[null]"
+             period5_mode="[null]" period5_param="[null]" period5_date="[null]"
+             depth="[null]" scope="PRJ" qualifier="TRK" created_at="2008-12-02 13:58:00.00"
+             build_date="2008-12-02 13:58:00.00" version="[null]" path="[null]"/>
+
+  <project_measures ID="2" project_id="2" SNAPSHOT_ID="2" RULE_ID="[null]" characteristic_id="[null]"
+                    url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
+                    variation_value_4="[null]"
+                    variation_value_5="[null]" rule_priority="[null]" alert_text="[null]" VALUE="10.0" METRIC_ID="1"
+                    rules_category_id="[null]"
+                    person_id="[null]"
+                    text_value="[null]" tendency="[null]" measure_date="[null]" alert_status="[null]"
+                    description="[null]" measure_data="[null]"/>
+
+  <dependencies id="3" from_resource_id="33" from_snapshot_id="33" to_resource_id="44" 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="4" from_resource_id="55" from_snapshot_id="55" to_resource_id="66" to_snapshot_id="66"
+                parent_dependency_id="[null]" project_snapshot_id="2"
+                dep_usage="USES" dep_weight="1" from_scope="LIB" to_scope="PRJ"/>
+
+  <events id="2" resource_id="2" snapshot_id="2"
+          category="VERSION" description="[null]" name="Version 1.0" event_date="2008-12-02 13:58:00.00"
+          created_at="[null]"
+          event_data="[null]"/>
+
+  <duplications_index id="2" project_snapshot_id="2" snapshot_id="2"
+                      hash="bb" index_in_file="0" start_line="0" end_line="0"/>
+
+  <snapshot_data id="2" resource_id="5" snapshot_id="5" snapshot_data="0,10,k" data_type="highlight_syntax"
+                 created_at="[null]" updated_at="[null]"/>
 
 </dataset>