Database upgrade problem for 2.4.8-2 to 3.1.0-1

Hi @bdm

Yes, I think you are right!
If possible it would be good to repair those entries in the OJS 2.4.8 DB. Is it possible for you to test this SQL on OJS 2.4.8 DB:
INSERT INTO review_rounds (submission_id, round, review_revision) SELECT DISTINCT ra.submission_id, ra.round, af.revision FROM review_assignments ra, article_files af, articles a WHERE (ra.submission_id, ra.round) NOT IN (SELECT rr.submission_id, rr.round FROM review_rounds rr) AND a.article_id = ra.submission_id AND af.article_id = a.article_id AND af.file_id = a.review_file_id AND af.file_stage = 2 AND af.round = ra.round
and then try the upgrade to 3.1.1 again?

To have an overview what should be inserted or how many rows, maybe you could first execute only the select statement from above i.e.:
SELECT DISTINCT ra.submission_id, ra.round, af.revision FROM review_assignments ra, article_files af, articles a WHERE (ra.submission_id, ra.round) NOT IN (SELECT rr.submission_id, rr.round FROM review_rounds rr) AND a.article_id = ra.submission_id AND af.article_id = a.article_id AND af.file_id = a.review_file_id AND af.file_stage = 2 AND af.round = ra.round

Best,
Bozana