]> source.dussan.org Git - sonarqube.git/commitdiff
SONAR-7780 Drop column PROJECT_MEASURES.SNAPSHOT_ID
authorSimon Brandhof <simon.brandhof@sonarsource.com>
Tue, 5 Jul 2016 21:21:30 +0000 (23:21 +0200)
committerSimon Brandhof <simon.brandhof@sonarsource.com>
Wed, 6 Jul 2016 13:44:31 +0000 (15:44 +0200)
35 files changed:
server/sonar-server/src/test/resources/org/sonar/server/computation/step/FillMeasuresWithVariationsStepTest/shared.xml [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistDuplicationMeasuresStepTest/persist_duplication_on_same_file-result.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistNumberOfDaysSinceLastCommitStepTest/insert-from-index-result.xml
server/sonar-server/src/test/resources/org/sonar/server/computation/step/PersistNumberOfDaysSinceLastCommitStepTest/insert-from-report-result.xml
server/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml [deleted file]
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/ignore_person_measures.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/ignore_quality_model_measures.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/shared.xml
server/sonar-server/src/test/resources/org/sonar/server/measure/MeasureFilterExecutorTest/sort_by_alert.xml
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_indices_on_tree_columns_of_snapshots.rb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_tree_columns_from_snapshots.rb [deleted file]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_drop_tree_columns_from_snapshots.rb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_index_on_snapshot_id_of_measures.rb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_snapshot_id_column_from_measures.rb [new file with mode: 0644]
server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_add_index_on_analysis_uuid_of_measures.rb [new file with mode: 0644]
sonar-db/src/main/java/org/sonar/db/version/DatabaseVersion.java
sonar-db/src/main/java/org/sonar/db/version/MigrationStepModule.java
sonar-db/src/main/java/org/sonar/db/version/v60/DropSnapshotIdColumnFromMeasures.java [new file with mode: 0644]
sonar-db/src/main/resources/org/sonar/db/version/rows-h2.sql
sonar-db/src/main/resources/org/sonar/db/version/schema-h2.ddl
sonar-db/src/test/java/org/sonar/db/version/MigrationStepModuleTest.java
sonar-db/src/test/java/org/sonar/db/version/v60/DropSnapshotIdColumnFromMeasuresTest.java [new file with mode: 0644]
sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml [deleted file]
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/insert-result.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/past_measures_with_person_id.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/select_by_snapshot_and_metric_keys.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/shared.xml
sonar-db/src/test/resources/org/sonar/db/measure/MeasureDaoTest/with_some_measures_for_developer.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteSnapshot.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldDeleteWastedMeasuresWhenPurgingAnalysis.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis-result.xml
sonar-db/src/test/resources/org/sonar/db/purge/PurgeCommandsTest/shouldPurgeAnalysis.xml

diff --git a/server/sonar-server/src/test/resources/org/sonar/server/computation/step/FillMeasuresWithVariationsStepTest/shared.xml b/server/sonar-server/src/test/resources/org/sonar/server/computation/step/FillMeasuresWithVariationsStepTest/shared.xml
deleted file mode 100644 (file)
index eb57c24..0000000
+++ /dev/null
@@ -1,127 +0,0 @@
-<dataset>
-
-  <metrics id="1"
-           name="ncloc"
-           short_name="ncloc"
-           VAL_TYPE="INT"
-           enabled="true"/>
-  <metrics id="2"
-           name="coverage"
-           short_name="coverage"
-           VAL_TYPE="PERCENT"
-           enabled="true"/>
-  <metrics id="3"
-           name="file_complexity"
-           short_name="file_complexity"
-           VAL_TYPE="FLOAT"
-           enabled="true"/>
-  <metrics id="4"
-           name="test_execution_time"
-           short_name="test_execution_time"
-           VAL_TYPE="MILLISEC"
-           enabled="true"/>
-
-  <rules id="30"
-         name="Check Header"
-         plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.header.HeaderCheck"
-         plugin_config_key="Checker/Treewalker/HeaderCheck"
-         plugin_name="checkstyle"/>
-
-  <rules id="31"
-         name="Equals Avoid Null"
-         plugin_rule_key="com.puppycrawl.tools.checkstyle.checks.coding.EqualsAvoidNullCheck"
-         plugin_config_key="Checker/TreeWalker/EqualsAvoidNull"
-         plugin_name="checkstyle"/>
-
-  <!-- project -->
-  <projects uuid="ABCD"
-            uuid_path="NOT_USED"
-            project_uuid="ABCD"
-            module_uuid="[null]"
-            module_uuid_path=".ABCD."
-            enabled="true"
-            id="1"
-            scope="PRJ"
-            qualifier="TRK"
-            kee="PROJECT_KEY"
-            name="project"
-            root_id="[null]"/>
-
-  <!-- directory -->
-  <projects uuid="BCDE"
-            uuid_path="NOT_USED"
-            project_uuid="ABCD"
-            module_uuid="ABCD"
-            module_uuid_path=".ABCD."
-            enabled="true"
-            id="2"
-            scope="DIR"
-            qualifier="PAC"
-            kee="DIRECTORY_KEY"
-            name="org.foo"
-            root_id="1"/>
-
-  <!-- snapshots -->
-  <snapshots id="1000"
-             uuid="u1000"
-             project_id="1"
-             root_project_id="1"
-
-             scope="PRJ"
-             qualifier="TRK"
-             created_at="1225544280000"
-             build_date="1225544280000"
-             status="P"
-             islast="false"/>
-  <snapshots id="1001"
-             uuid="u1001"
-             project_id="2"
-             root_project_id="1"
-             root_snapshot_id="1000"
-             scope="DIR"
-             qualifier="PAC"
-             created_at="1225544280000"
-             build_date="1225544280000"
-             status="P"
-             islast="false"/>
-
-
-  <!-- project measures -->
-  <project_measures id="1"
-                    VALUE="60"
-                    METRIC_ID="1"
-                    SNAPSHOT_ID="1000"
-                    analysis_uuid="u1000"
-                    text_value="[null]"
-                    project_id="[null]"
-                    person_id="[null]"/>
-
-  <project_measures id="2"
-                    VALUE="80"
-                    METRIC_ID="2"
-                    SNAPSHOT_ID="1000"
-                    analysis_uuid="u1000"
-                    text_value="[null]"
-                    project_id="[null]"
-                    person_id="[null]"/>
-
-  <!-- package measures -->
-  <project_measures id="3"
-                    VALUE="20"
-                    METRIC_ID="1"
-                    SNAPSHOT_ID="1001"
-                    analysis_uuid="u1000"
-                    text_value="[null]"
-                    project_id="[null]"
-                    person_id="[null]"/>
-
-  <project_measures id="4"
-                    VALUE="70"
-                    METRIC_ID="2"
-                    SNAPSHOT_ID="1001"
-                    analysis_uuid="u1000"
-                    text_value="[null]"
-                    project_id="[null]"
-                    person_id="[null]"/>
-
-</dataset>
index f788fbd156e9fd286075b1064ebb0fdae064d390..6c9a20a394781fc3bda3d9df9942b18e364d7f26 100644 (file)
@@ -1,7 +1,6 @@
 <dataset>
 
   <project_measures id="1"
-                    snapshot_id="1000"
                     analysis_uuid="u1000"
                     metric_id="10"
                     value="[null]"
@@ -14,7 +13,6 @@
                     variation_value_5="[null]"/>
 
   <project_measures id="2"
-                    snapshot_id="1000"
                     analysis_uuid="u1000"
                     metric_id="10"
                     value="[null]"
index 3006765aa14d1f6b40e00abd33dcfc825e1dbf3c..bebfa323a9f223cde15060cf030b344cd3b69413 100644 (file)
@@ -1,6 +1,5 @@
 <dataset>
-  <project_measures snapshot_id="1000"
-                    analysis_uuid="u1000"
+  <project_measures analysis_uuid="u1000"
                     metric_id="10"
                     value="6.0"
                     project_id="[null]"
index 1cacaf4f14da6035eedab4ed008fbdf41d0f68e2..2ade50f852e35e3a5628846eda4dadbc26ec172a 100644 (file)
@@ -1,6 +1,5 @@
 <dataset>
-  <project_measures snapshot_id="1000"
-                    analysis_uuid="u1000"
+  <project_measures analysis_uuid="u1000"
                     metric_id="10"
                     value="3.0"
                     project_id="[null]"
diff --git a/server/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml b/server/sonar-server/src/test/resources/org/sonar/server/filters/FilterExecutorTest/views.xml
deleted file mode 100644 (file)
index 329e12e..0000000
+++ /dev/null
@@ -1,56 +0,0 @@
-<dataset>
-  <!-- java project -->
-  <projects long_name="java project" id="1" scope="PRJ" kee="project:java" qualifier="TRK" name="java project"
-            root_id="[null]"
-            description="[null]" enabled="true"  language="java" copy_resource_id="[null]" person_id="[null]"/>
-
-  <!-- views -->
-  <projects long_name="Root view" id="2" scope="PRJ" kee="ROOT_VIEW" qualifier="VW" name="Root view"
-            root_id="[null]"
-            description="[null]" enabled="true"  language="[null]" copy_resource_id="[null]" person_id="[null]"/>
-
-  <projects long_name="Sub view" id="3" scope="PRJ" kee="SUB_VIEW" qualifier="SVW" name="Sub view"
-            root_id="2"
-            description="[null]" enabled="true"  language="[null]" copy_resource_id="[null]" person_id="[null]"/>
-
-  <!-- java project copy used in view -->
-  <projects long_name="java project" id="4" scope="FIL" kee="cp-project:java" qualifier="TRK" name="java project"
-            root_id="2"
-            description="[null]" enabled="true"  language="java" copy_resource_id="1"/>
-
-
-  <!-- snapshots -->
-  <snapshots purge_status="[null]" 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]"
-             id="1"
-             uuid="u1"
-             created_at="1230163200000" build_date="1230163200000" version="1.0" project_id="1" scope="PRJ" qualifier="TRK"
-             root_project_id="1"   STATUS="P" ISLAST="true"
-             path=""
-             depth="0"/>
-
-  <snapshots purge_status="[null]" 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]"
-             id="2"
-             uuid="u2"
-             created_at="1230163201000" build_date="1230163201000" version="1.0" project_id="3" scope="PRJ" qualifier="VW"
-             root_project_id="2"   STATUS="P" ISLAST="true"
-             path=""
-             depth="0"/>
-
-  <snapshots purge_status="[null]" 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]"
-             id="3"
-             uuid="u3"
-             created_at="1230163201000" build_date="1230163201000" version="1.0" project_id="3" scope="PRJ" qualifier="SVW"
-             root_project_id="2" root_snapshot_id="2"  STATUS="P" ISLAST="true"
-             path="2."
-             depth="1"/>
-
-  <snapshots purge_status="[null]" 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]"
-             id="4"
-             uuid="u4"
-             created_at="1230163200000" build_date="1230163200000" version="1.0" project_id="4" scope="FIL" qualifier="TRK"
-             root_project_id="2" root_snapshot_id="2"  STATUS="P" ISLAST="true"
-             path="2.3."
-             depth="2"/>
-
-
-</dataset>
index 8e87303e302b88fcfedf42c386c97e8068685144..ac89dc2cc4aabf2cdb32c69ad0052a876eaef543 100644 (file)
@@ -61,7 +61,6 @@
   <project_measures id="1001"
                     metric_id="1"
                     value="500"
-                    snapshot_id="101"
                     analysis_uuid="u101"
                     person_id="[null]"
                     variation_value_1="[null]"
@@ -79,7 +78,6 @@
   <project_measures id="1002"
                     metric_id="1"
                     value="300"
-                    snapshot_id="101"
                     analysis_uuid="u101"
                     person_id="30000"
                     variation_value_1="[null]"
@@ -96,7 +94,6 @@
   <project_measures id="1003"
                     metric_id="1"
                     value="200"
-                    snapshot_id="101"
                     analysis_uuid="u101"
                     person_id="40000"
                     variation_value_1="[null]"
index 02382f0b85d1ef87360e6d3cca4df2932e6b9ce9..4242edcfbc855a3041c0c0120d89553441d5d5d0 100644 (file)
@@ -59,7 +59,6 @@
   <project_measures id="1001"
                     metric_id="1"
                     value="500"
-                    snapshot_id="101"
                     analysis_uuid="u101"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
@@ -74,7 +73,7 @@
                     person_id="[null]"/>
 
   <!-- details of the measure by model characteristic -->
-  <!--project_measures id="1002" metric_id="1" value="300" snapshot_id="101" characteristic_id="30000"
+  <!--project_measures id="1002" metric_id="1" value="300" characteristic_id="30000"
                     url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
                     variation_value_4="[null]" variation_value_5="400"
                     rule_priority="[null]" alert_text="[null]" RULES_CATEGORY_ID="[null]"
@@ -82,7 +81,7 @@
                     component_uuid="ABCD"
                     alert_status="[null]" description="[null]" person_id="[null]"/>-->
 
-  <!--project_measures id="1003" metric_id="1" value="200" snapshot_id="101" characteristic_id="40000"
+  <!--project_measures id="1003" metric_id="1" value="200" characteristic_id="40000"
                     url="[null]" variation_value_1="[null]" variation_value_2="[null]" variation_value_3="[null]"
                     variation_value_4="[null]" variation_value_5="400"
                     alert_text="[null]" RULES_CATEGORY_ID="[null]"
index 336457595b891d2ef7e17a64aa01631632b41c47..8a870e0ab2cdae4c54277eebb9616bf96d64aec4 100644 (file)
   <project_measures id="1001"
                     metric_id="1"
                     value="510"
-                    snapshot_id="101"
                     analysis_uuid="u101"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1002"
                     metric_id="1"
                     value="510"
-                    snapshot_id="102"
                     analysis_uuid="u101"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1003"
                     metric_id="1"
                     value="500"
-                    snapshot_id="103"
                     analysis_uuid="u101"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1004"
                     metric_id="1"
                     value="10"
-                    snapshot_id="104"
                     analysis_uuid="u101"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1005"
                     metric_id="2"
                     value="[null]"
-                    snapshot_id="101"
                     analysis_uuid="u101"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1006"
                     metric_id="3"
                     value="12.3"
-                    snapshot_id="101"
                     analysis_uuid="u101"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1010"
                     metric_id="1"
                     value="5000"
-                    snapshot_id="110"
                     analysis_uuid="u110"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1011"
                     metric_id="2"
                     value="[null]"
-                    snapshot_id="110"
                     analysis_uuid="u110"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
index 03535c65ecd55a2624524c4453c3775de2b4e560..d6a9982ad05bcb3448fb2e719cee67257a6ff9d3 100644 (file)
@@ -63,7 +63,6 @@
   <project_measures id="1001"
                     metric_id="5"
                     value="510"
-                    snapshot_id="101"
                     analysis_uuid="u101"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1010"
                     metric_id="5"
                     value="5000"
-                    snapshot_id="110"
                     analysis_uuid="u110"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
   <project_measures id="1020"
                     metric_id="5"
                     value="5000"
-                    snapshot_id="120"
                     analysis_uuid="u120"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_indices_on_tree_columns_of_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_indices_on_tree_columns_of_snapshots.rb
new file mode 100644 (file)
index 0000000..56067d8
--- /dev/null
@@ -0,0 +1,41 @@
+#
+# 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 6.0
+#
+class DropIndicesOnTreeColumnsOfSnapshots < ActiveRecord::Migration
+
+  def self.up
+    remove_index_quietly 'snapshots_qualifier'
+    remove_index_quietly 'snapshots_root'
+    remove_index_quietly 'snapshots_parent'
+    remove_index_quietly 'snapshot_root_component'
+  end
+
+  private
+  def self.remove_index_quietly(index_name)
+    begin
+      remove_index :snapshots, :name => index_name
+    rescue
+      #ignore
+    end
+  end
+end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_tree_columns_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1270_drop_tree_columns_from_snapshots.rb
deleted file mode 100644 (file)
index 5c01edd..0000000
+++ /dev/null
@@ -1,42 +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 6.0
-#
-class DropTreeColumnsFromSnapshots < ActiveRecord::Migration
-
-  def self.up
-    remove_index_quietly 'snapshots_qualifier'
-    remove_index_quietly 'snapshots_root'
-    remove_index_quietly 'snapshots_parent'
-    remove_index_quietly 'snapshot_root_component'
-    execute_java_migration('org.sonar.db.version.v60.DropTreeColumnsFromSnapshots')
-  end
-
-  private
-  def self.remove_index_quietly(index_name)
-    begin
-      remove_index :snapshots, :name => index_name
-    rescue
-      #ignore
-    end
-  end
-end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_drop_tree_columns_from_snapshots.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1271_drop_tree_columns_from_snapshots.rb
new file mode 100644 (file)
index 0000000..262b376
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# 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 6.0
+#
+class DropTreeColumnsFromSnapshots < ActiveRecord::Migration
+
+  def self.up
+    execute_java_migration('org.sonar.db.version.v60.DropTreeColumnsFromSnapshots')
+  end
+
+end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_index_on_snapshot_id_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1272_drop_index_on_snapshot_id_of_measures.rb
new file mode 100644 (file)
index 0000000..d37b100
--- /dev/null
@@ -0,0 +1,34 @@
+#
+# 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 6.0
+#
+class DropIndexOnSnapshotIdOfMeasures < ActiveRecord::Migration
+
+  def self.up
+    begin
+      remove_index :project_measures, :name => 'measures_sid_metric'
+    rescue
+      #ignore
+    end
+  end
+
+end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_snapshot_id_column_from_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1273_drop_snapshot_id_column_from_measures.rb
new file mode 100644 (file)
index 0000000..8822b7c
--- /dev/null
@@ -0,0 +1,30 @@
+#
+# 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 6.0
+#
+class DropSnapshotIdColumnFromMeasures < ActiveRecord::Migration
+
+  def self.up
+    execute_java_migration('org.sonar.db.version.v60.DropSnapshotIdColumnFromMeasures')
+  end
+
+end
diff --git a/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_add_index_on_analysis_uuid_of_measures.rb b/server/sonar-web/src/main/webapp/WEB-INF/db/migrate/1274_add_index_on_analysis_uuid_of_measures.rb
new file mode 100644 (file)
index 0000000..f2ad93b
--- /dev/null
@@ -0,0 +1,29 @@
+#
+# 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 6.0
+#
+class AddIndexOnAnalysisUuidOfMeasures < ActiveRecord::Migration
+
+  def self.up
+    add_index :project_measures, [:analysis_uuid, :metric_id], :name => 'measures_analysis_metric'
+  end
+end
index b4502015897b435e3321ec45bba0966a029babf1..6e2c2b45bf7fbc094335c397de26ce6f5e8e6553 100644 (file)
@@ -30,7 +30,7 @@ import org.sonar.db.MyBatis;
 
 public class DatabaseVersion {
 
-  public static final int LAST_VERSION = 1_270;
+  public static final int LAST_VERSION = 1_274;
 
   /**
    * The minimum supported version which can be upgraded. Lower
index a074b019c92c6acd16ed108d441e8a9b871c304d..70c455862a752a7f3baa0c0d28a82c5ac19da30b 100644 (file)
@@ -113,6 +113,7 @@ import org.sonar.db.version.v60.DropProjectIdColumnFromMeasures;
 import org.sonar.db.version.v60.DropRememberMeColumnsFromUsers;
 import org.sonar.db.version.v60.DropSnapshotIdColumnFromCeActivity;
 import org.sonar.db.version.v60.DropSnapshotIdColumnFromEvents;
+import org.sonar.db.version.v60.DropSnapshotIdColumnFromMeasures;
 import org.sonar.db.version.v60.DropSnapshotIdColumnsFromDuplicationsIndex;
 import org.sonar.db.version.v60.DropTreeColumnsFromSnapshots;
 import org.sonar.db.version.v60.DropTreesOfSnapshots;
@@ -305,7 +306,8 @@ public class MigrationStepModule extends Module {
       MakeAnalysisUuidNotNullOnMeasures.class,
 
       DropTreesOfSnapshots.class,
-      DropTreeColumnsFromSnapshots.class
+      DropTreeColumnsFromSnapshots.class,
+      DropSnapshotIdColumnFromMeasures.class
     );
   }
 }
diff --git a/sonar-db/src/main/java/org/sonar/db/version/v60/DropSnapshotIdColumnFromMeasures.java b/sonar-db/src/main/java/org/sonar/db/version/v60/DropSnapshotIdColumnFromMeasures.java
new file mode 100644 (file)
index 0000000..b992bc7
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.db.version.v60;
+
+import java.sql.SQLException;
+import org.sonar.db.Database;
+import org.sonar.db.version.DdlChange;
+import org.sonar.db.version.DropColumnsBuilder;
+
+public class DropSnapshotIdColumnFromMeasures extends DdlChange {
+
+  private static final String TABLE = "project_measures";
+
+  public DropSnapshotIdColumnFromMeasures(Database db) {
+    super(db);
+  }
+
+  @Override
+  public void execute(Context context) throws SQLException {
+    context.execute(new DropColumnsBuilder(getDatabase().getDialect(), TABLE, "snapshot_id").build());
+  }
+
+}
index 0152eefd204324c68889cc8ab4750eb0728233cd..d753b8a5017746e20c4ba54510d550de6395d8fb 100644 (file)
@@ -477,6 +477,10 @@ INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1267');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1268');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1269');
 INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1270');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1271');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1272');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1273');
+INSERT INTO SCHEMA_MIGRATIONS(VERSION) VALUES ('1274');
 
 INSERT INTO USERS(ID, LOGIN, NAME, EMAIL, EXTERNAL_IDENTITY, EXTERNAL_IDENTITY_PROVIDER, USER_LOCAL, CRYPTED_PASSWORD, SALT, CREATED_AT, UPDATED_AT) VALUES (1, 'admin', 'Administrator', '', 'admin', 'sonarqube', true, 'a373a0e667abb2604c1fd571eb4ad47fe8cc0878', '48bc4b0d93179b5103fd3885ea9119498e9d161b', '1418215735482', '1418215735482');
 ALTER TABLE USERS ALTER COLUMN ID RESTART WITH 2;
index b4ff7ab06de025935593bdc4333edb78ea9cc49d..1983c30d7a371e74f11b8851c6b02d756a1a1d62 100644 (file)
@@ -194,7 +194,6 @@ CREATE TABLE "PROJECT_MEASURES" (
   "METRIC_ID" INTEGER NOT NULL,
   "COMPONENT_UUID" VARCHAR(50) NOT NULL,
   "ANALYSIS_UUID" VARCHAR(50) NOT NULL,
-  "SNAPSHOT_ID" INTEGER,
   "TEXT_VALUE" VARCHAR(4000),
   "ALERT_STATUS" VARCHAR(5),
   "ALERT_TEXT" VARCHAR(4000),
@@ -554,7 +553,7 @@ CREATE INDEX "INDEX_GROUPS_USERS_ON_USER_ID" ON "GROUPS_USERS" ("USER_ID");
 
 CREATE UNIQUE INDEX "GROUPS_USERS_UNIQUE" ON "GROUPS_USERS" ("GROUP_ID", "USER_ID");
 
-CREATE INDEX "MEASURES_SID_METRIC" ON "PROJECT_MEASURES" ("SNAPSHOT_ID", "METRIC_ID");
+CREATE INDEX "MEASURES_ANALYSIS_METRIC" ON "PROJECT_MEASURES" ("ANALYSIS_UUID", "METRIC_ID");
 
 CREATE INDEX "MEASURES_PERSON" ON "PROJECT_MEASURES" ("PERSON_ID");
 
index 579506d38b1e5652fad8f7ac6f36ffc83d48e8a8..c5fbc32539bddd8279ecd5eb1ddbfe584f4b19ac 100644 (file)
@@ -29,6 +29,6 @@ public class MigrationStepModuleTest {
   public void verify_count_of_added_MigrationStep_types() {
     ComponentContainer container = new ComponentContainer();
     new MigrationStepModule().configure(container);
-    assertThat(container.size()).isEqualTo(126);
+    assertThat(container.size()).isEqualTo(127);
   }
 }
diff --git a/sonar-db/src/test/java/org/sonar/db/version/v60/DropSnapshotIdColumnFromMeasuresTest.java b/sonar-db/src/test/java/org/sonar/db/version/v60/DropSnapshotIdColumnFromMeasuresTest.java
new file mode 100644 (file)
index 0000000..80f21f1
--- /dev/null
@@ -0,0 +1,47 @@
+/*
+ * SonarQube
+ * Copyright (C) 2009-2016 SonarSource SA
+ * mailto:contact AT sonarsource DOT com
+ *
+ * This program 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.
+ *
+ * This program 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.db.version.v60;
+
+import java.sql.SQLException;
+import org.junit.Test;
+import org.sonar.db.Database;
+import org.sonar.db.dialect.PostgreSql;
+import org.sonar.db.version.DdlChange;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+import static org.mockito.Mockito.when;
+
+public class DropSnapshotIdColumnFromMeasuresTest {
+
+  private Database database = mock(Database.class);
+  private DropSnapshotIdColumnFromMeasures underTest = new DropSnapshotIdColumnFromMeasures(database);
+
+  @Test
+  public void verify_generated_sql_on_postgresql() throws SQLException {
+    when(database.getDialect()).thenReturn(new PostgreSql());
+
+    DdlChange.Context context = mock(DdlChange.Context.class);
+    underTest.execute(context);
+
+    verify(context).execute("ALTER TABLE project_measures DROP COLUMN snapshot_id");
+  }
+
+}
diff --git a/sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml b/sonar-db/src/test/resources/org/sonar/db/component/ResourceDaoTest/get_last_snapshot_by_component_uuid.xml
deleted file mode 100644 (file)
index 60235fa..0000000
+++ /dev/null
@@ -1,246 +0,0 @@
-<dataset>
-
-  <!-- Struts projects is authorized for all user -->
-  <group_roles id="1"
-               group_id="[null]"
-               resource_id="1"
-               role="user"/>
-
-
-  <!-- root project -->
-  <projects id="1"
-            root_id="[null]"
-            scope="PRJ"
-            qualifier="TRK"
-            kee="org.struts:struts"
-            name="Struts"
-            uuid="ABCD"
-            project_uuid="ABCD"
-            module_uuid="[null]"
-            module_uuid_path="."
-            description="the description"
-            long_name="Apache Struts"
-            enabled="[true]"
-            language="java"
-            copy_resource_id="[null]"
-            person_id="[null]"
-            path="[null]"
-            authorization_updated_at="[null]"/>
-  <snapshots id="1"
-             uuid="u1"
-             project_id="1"
-
-             root_project_id="1"
-
-             status="P"
-             islast="[true]"
-             purge_status="[null]"
-             period1_mode="previous_analysis"
-             period1_param="[null]"
-             period1_date="[null]"
-             period2_mode="days"
-             period2_param="30"
-             period2_date="1316815200000"
-             period3_mode="days"
-             period3_param="90"
-             period3_date="1311631200000"
-             period4_mode="previous_analysis"
-             period4_param="[null]"
-             period4_date="[null]"
-             period5_mode="previous_version"
-             period5_param="[null]"
-             period5_date="[null]"
-             depth="[null]"
-             scope="PRJ"
-             qualifier="TRK"
-             created_at="1228222680000"
-             build_date="1228222680000"
-             version="[null]"
-             path=""/>
-  <snapshots id="10"
-             uuid="u10"
-             project_id="1"
-
-             root_project_id="1"
-
-             status="P"
-             islast="[false]"
-             purge_status="[null]"
-             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="1228136280000"
-             build_date="1228136280000"
-             version="[null]"
-             path=""/>
-
-  <!-- module -->
-  <projects id="2"
-            root_id="1"
-            kee="org.struts:struts-core"
-            name="Struts Core"
-            uuid="EFGH"
-            project_uuid="ABCD"
-            module_uuid="[null]"
-            module_uuid_path=".ABCD."
-            scope="PRJ"
-            qualifier="BRC"
-            long_name="Struts Core"
-            description="[null]"
-            enabled="[true]"
-            language="java"
-            copy_resource_id="[null]"
-            person_id="[null]"
-            authorization_updated_at="[null]"/>
-  <snapshots id="2"
-             uuid="u2"
-             project_id="2"
-
-             root_project_id="1"
-             root_snapshot_id="1"
-             status="P"
-             islast="[true]"
-             purge_status="[null]"
-             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="BRC"
-             created_at="1228222680000"
-             build_date="1228222680000"
-             version="[null]"
-             path="1."/>
-
-  <!-- directory -->
-  <projects long_name="org.struts"
-            id="3"
-            scope="DIR"
-            qualifier="DIR"
-            kee="org.struts:struts-core:src/org/struts"
-            uuid="GHIJ"
-            project_uuid="ABCD"
-            module_uuid="EFGH"
-            module_uuid_path=".ABCD.EFGH."
-            name="src/org/struts"
-            root_id="2"
-            description="[null]"
-            enabled="[true]"
-            language="java"
-            copy_resource_id="[null]"
-            person_id="[null]"
-            path="src/org/struts"
-            authorization_updated_at="[null]"/>
-  <snapshots id="3"
-             uuid="u3"
-             project_id="3"
-
-             root_project_id="1"
-             root_snapshot_id="1"
-             status="P"
-             islast="[true]"
-             purge_status="[null]"
-             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="DIR"
-             qualifier="PAC"
-             created_at="1228222680000"
-             build_date="1228222680000"
-             version="[null]"
-             path="1.2."/>
-
-  <!-- file -->
-  <projects long_name="org.struts.RequestContext"
-            id="4"
-            scope="FIL"
-            qualifier="FIL"
-            kee="org.struts:struts-core:src/org/struts/RequestContext.java"
-            uuid="KLMN"
-            project_uuid="ABCD"
-            module_uuid="EFGH"
-            module_uuid_path=".ABCD.EFGH."
-            name="RequestContext.java"
-            root_id="2"
-            description="[null]"
-            enabled="[true]"
-            language="java"
-            copy_resource_id="[null]"
-            person_id="[null]"
-            path="src/org/struts/RequestContext.java"
-            authorization_updated_at="[null]"/>
-
-  <snapshots id="4"
-             uuid="u4"
-             project_id="4"
-
-             root_project_id="1"
-             root_snapshot_id="1"
-             status="P"
-             islast="[true]"
-             purge_status="[null]"
-             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="FIL"
-             qualifier="CLA"
-             created_at="1228222680000"
-             build_date="1228222680000"
-             version="[null]"
-             path="1.2.3."/>
-
-
-</dataset>
index 2072fa6c6a36d210a946a76b311d7eaf575b178c..7d63f40cee486affa3c80f125256a987bbe0b31a 100644 (file)
@@ -1,7 +1,6 @@
 <dataset>
   <project_measures
       id="1"
-      snapshot_id="2"
       analysis_uuid="u2"
       metric_id="3"
       component_uuid="FILE1"
index bf671f3c2c6ccbbc5a5b1ae9369be3ca23b86ad3..4af31e7637f1e5ae07acb39e061e237de6dd5732 100644 (file)
@@ -99,7 +99,6 @@
   <project_measures id="1"
                     VALUE="60"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="1000"
                     analysis_uuid="u1000"
                     person_id="[null]"
                     component_uuid="ABCD"/>
   <project_measures id="2"
                     VALUE="80"
                     METRIC_ID="2"
-                    SNAPSHOT_ID="1000"
                     analysis_uuid="u1000"
                     person_id="[null]"
                     component_uuid="ABCD"/>
   <project_measures id="3"
                     VALUE="20"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="1001"
                     analysis_uuid="u1000"
                     person_id="[null]"
                     component_uuid="BCDE"/>
   <project_measures id="4"
                     VALUE="70"
                     METRIC_ID="2"
-                    SNAPSHOT_ID="1001"
                     analysis_uuid="u1000"
                     person_id="[null]"
                     component_uuid="BCDE"/>
   <project_measures id="5"
                     VALUE="5"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="1002"
                     analysis_uuid="u1000"
                     person_id="[null]"
                     component_uuid="CDEF"/>
   <project_measures id="6"
                     VALUE="60"
                     METRIC_ID="2"
-                    SNAPSHOT_ID="1002"
                     analysis_uuid="u1000"
                     person_id="[null]"
                     component_uuid="CDEF"/>
index 10e7435e67fa2f370dc131219e8c88bbbc6517dc..40d6967f54f44bf7b7578bfa1e6694b2694dd0de 100644 (file)
@@ -37,7 +37,6 @@
   <project_measures id="1"
                     VALUE="60"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="1000"
                     analysis_uuid="u1000"
                     person_id="[null]"
                     component_uuid="ABCD"/>
@@ -45,7 +44,6 @@
   <project_measures id="2"
                     VALUE="20"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="1000"
                     analysis_uuid="u1000"
                     person_id="20"
                     component_uuid="ABCD"/>
@@ -53,7 +51,6 @@
   <project_measures id="3"
                     VALUE="40"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="1000"
                     analysis_uuid="u1000"
                     person_id="21"
                     component_uuid="ABCD"/>
index bbc405f1e5567c27d5cc063e0d230a9cbed89b55..cc5fc7a8e78cdf8182b3a79945ca56cd5106906d 100644 (file)
@@ -20,7 +20,6 @@
              islast="[true]"/>
 
   <project_measures id="20"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="10"
                     value="[null]"
@@ -35,7 +34,6 @@
                     alert_text="[null]"
                     component_uuid="FILE1"/>
   <project_measures id="21"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="11"
                     value="[null]"
@@ -50,7 +48,6 @@
                     alert_text="[null]"
                     component_uuid="FILE1"/>
   <project_measures id="22"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="12"
                     value="10"
index 0500ab6eaefd51dc5432722f75d46903850eb7b5..728d778319ee3beed7536b4b6c45466f29d9f895 100644 (file)
@@ -21,7 +21,6 @@
 
   <project_measures id="20"
                     component_uuid="ABCD"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="10"
                     value="[null]"
@@ -36,7 +35,6 @@
                     alert_text="[null]"/>
   <project_measures id="21"
                     component_uuid="ABCD"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="11"
                     value="[null]"
@@ -51,7 +49,6 @@
                     alert_text="[null]"/>
   <project_measures id="22"
                     component_uuid="ABCD"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="12"
                     value="10"
index fe431cc00d0b5de2f122063efa99fbc84f861706..a82e0419bc9569b710004f890f57c3802b24d238 100644 (file)
@@ -27,7 +27,6 @@
   />
 
   <project_measures id="20"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="10"
                     value="[null]"
@@ -43,7 +42,6 @@
                     person_id="[null]"
                     component_uuid="1"/>
   <project_measures id="21"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="11"
                     value="[null]"
@@ -59,7 +57,6 @@
                     person_id="[null]"
                     component_uuid="1"/>
   <project_measures id="22"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="12"
                     value="10"
@@ -76,7 +73,6 @@
                     component_uuid="1"/>
   <!--measures for developer 333-->
   <project_measures id="30"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="10"
                     value="[null]"
@@ -92,7 +88,6 @@
                     person_id="333"
                     component_uuid="1"/>
   <project_measures id="31"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="11"
                     value="[null]"
                     person_id="333"
                     component_uuid="1"/>
   <project_measures id="32"
-                    snapshot_id="5"
                     analysis_uuid="u5"
                     metric_id="12"
                     value="10"
index 1c9a15c19627b21c465798b7dfac62114d3dca3a..b40e87b9ebd2a9c4e5a15ff9196ea71525e7037d 100644 (file)
@@ -36,7 +36,6 @@
                     alert_text="[null]"
                     VALUE="10.0"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="1"
                     analysis_uuid="u1"
                     person_id="[null]"
                     text_value="[null]"
index be0982b550457a67b56843d900090135093b911e..1bfbfa5b4c1bc4fa00274ca055ce48677f0e1ae8 100644 (file)
@@ -36,7 +36,6 @@
                     alert_text="[null]"
                     VALUE="10.0"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="1"
                     analysis_uuid="u1"
                     person_id="[null]"
                     text_value="[null]"
@@ -98,7 +97,6 @@
                     alert_text="[null]"
                     VALUE="10.0"
                     METRIC_ID="1"
-                    SNAPSHOT_ID="5"
                     analysis_uuid="u5"
                     person_id="[null]"
                     text_value="[null]"
index 569aa166e673023a6157111983fd362b17e61d4f..b2b6d9f4667d69892dbd836ca6044989337a467f 100644 (file)
@@ -55,7 +55,6 @@
 
   <!-- do not delete standard measure -->
   <project_measures id="1"
-                    snapshot_id="1"
                     analysis_uuid="u1"
                     metric_id="1"
                     component_uuid="1"
index e3ed244edc08adaa080c436261a938e3360fcc95..2c0a7c2df25463f1b84f986efc078108f59e1060 100644 (file)
@@ -57,7 +57,6 @@
   <!-- do not delete standard measure -->
   <project_measures id="1"
                     component_uuid="1"
-                    snapshot_id="1"
                     analysis_uuid="u1"
                     metric_id="1"
                     variation_value_1="[null]"
@@ -76,7 +75,6 @@
   <!-- delete measure on metrics that are flagged with delete_historical_data=true -->
   <project_measures id="6"
                     component_uuid="1"
-                    snapshot_id="1"
                     analysis_uuid="u1"
                     metric_id="2"
                     variation_value_1="[null]"
@@ -95,7 +93,6 @@
   <!-- delete measure on developers -->
   <project_measures id="7"
                     component_uuid="1"
-                    snapshot_id="1"
                     analysis_uuid="u1"
                     metric_id="2"
                     variation_value_1="[null]"
index 7ddb144a1de943fb85f6d4afd74f9a970f39da26..251f2ea6c7a488b02611b8f17c7ecd7a797fb19d 100644 (file)
@@ -41,7 +41,6 @@ Note that measures, events and reviews are not deleted.
 
   <project_measures ID="1"
                     component_uuid="1"
-                    SNAPSHOT_ID="1"
                     analysis_uuid="u1"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
@@ -101,7 +100,6 @@ Note that measures, events and reviews are not deleted.
 
   <project_measures ID="2"
                     component_uuid="2"
-                    SNAPSHOT_ID="2"
                     analysis_uuid="u2"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
index 3a63377810ed3a9e8a119770ba6c3152c44235d1..fa0e9e864d1ac05f0f2e3a86fd670f08ac9c2986 100644 (file)
@@ -28,7 +28,6 @@
 
   <project_measures ID="1"
                     component_uuid="1"
-                    SNAPSHOT_ID="1"
                     analysis_uuid="u1"
                     variation_value_1="[null]"
                     variation_value_2="[null]"
@@ -92,7 +91,6 @@
 
   <project_measures ID="2"
                     component_uuid="2"
-                    SNAPSHOT_ID="2"
                     analysis_uuid="u2"
                     characteristic_id="[null]"
                     variation_value_1="[null]"