Hi @asmecher,
I’m trying to upgrade the OJS platform from version 3.3.0.13 to 3.4.0.8. When I run the php tools/upgrade.php file, after many hours of running the upgrade, it stopped due to a metrics error.
2025-04-03 00:21:24 [migration: APP\migration\upgrade\v3_4_0\I6782_MetricsGeo]
2025-04-04 11:14:43 [revert migration: APP\migration\upgrade\v3_4_0\I6782_MetricsSubmission]
2025-04-04 11:14:43 [downgrade for "APP\migration\upgrade\v3_4_0\I6782_MetricsSubmission" unsupported: Downgrade not supported]
ERROR: Upgrade failed: DB: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry 'usage_events_20151017.log-2-331-MX---2015-10-17' for key 'mesubmission_c_r_c_date' (SQL: insert into `metrics_submission_geo_daily` (`load_id`, `context_id`, `submission_id`, `country`, `region`, `city`, `date`, `metri_id, m.submission_id, COALESCE(m.country_id, ''), COALESCE(m.region, ''), COALESCE(m.city, ''), DATE_FORMAT(STR_TO_DATE(m.day, '%Y%m%d'), '%Y-%m-%d') as mday,`.`assoc_type` in (1048585, 515, 531) and `m`.`metric_type` = ojs::counter and (`m`.`country_id` is not null or `m`.`region` is not null or `m`.`city` is not sion_id, m.country_id, m.region, m.city, mday)