Merging platforms mixes baselines and targets into reported data
[WebKit-https.git] / Websites / perf.webkit.org / public / admin / platforms.php
index 487ee9c35357587e4ef5dec86828998253e9e79b..2c676684970fd1379af7954423e090809edc8f30 100644 (file)
@@ -11,7 +11,9 @@ function merge_platforms($platform_to_merge, $destination_platform) {
     // exist in both the original platform and the platform into which we're merging.
     if (!$db->query_and_get_affected_rows('UPDATE test_runs SET run_config = destination.config_id
         FROM test_configurations as merged, test_configurations as destination
-        WHERE merged.config_platform = $1 AND destination.config_platform = $2 AND run_config = merged.config_id
+        WHERE merged.config_platform = $1 AND destination.config_platform = $2
+            AND run_config = merged.config_id
+            AND destination.config_type = merged.config_type
             AND destination.config_metric = merged.config_metric', array($platform_to_merge, $destination_platform))) {
         $db->rollback_transaction();
         return notice("Failed to migrate test runs for $platform_to_merge that have test configurations in $destination_platform.");