ERROR: Upgrade failed: DB: Column ‘review_round_id’ cannot be null

Hi, I have problem running upgrade from ojs 2.4.8 to ojs 3.1.2.0
I found similirar topic in pkp forum, but I’m still not sure how to fix the problem.

Blockquote
ERROR: Reviewer files with ID 71194 from review assignment 19667 could not be found in the database table submission_files
ERROR: Reviewer files with ID 72292 from review assignment 19821 could not be found in the database table submission_files
ERROR: Reviewer files with ID 72664 from review assignment 20184 could not be found in the database table submission_files
ERROR: Reviewer files with ID 77021 from review assignment 20901 could not be found in the database table submission_files
ERROR: Reviewer files with ID 77231 from review assignment 21583 could not be found in the database table submission_files
ERROR: Reviewer files with ID 83074 from review assignment 22697 could not be found in the database table submission_files
ERROR: Reviewer files with ID 84688 from review assignment 23011 could not be found in the database table submission_files
ERROR: Reviewer files with ID 82850 from review assignment 23149 could not be found in the database table submission_files
ERROR: Reviewer files with ID 85071 from review assignment 23649 could not be found in the database table submission_files
ERROR: Reviewer files with ID 87514 from review assignment 24521 could not be found in the database table submission_files
ERROR: Reviewer files with ID 88550 from review assignment 24702 could not be found in the database table submission_files
ERROR: Reviewer files with ID 90048 from review assignment 24805 could not be found in the database table submission_files
ERROR: Reviewer files with ID 92814 from review assignment 25732 could not be found in the database table submission_files
ERROR: Reviewer files with ID 95646 from review assignment 26451 could not be found in the database table submission_files
ERROR: Reviewer files with ID 97879 from review assignment 27272 could not be found in the database table submission_files
ERROR: Reviewer files with ID 98726 from review assignment 27369 could not be found in the database table submission_files
ERROR: Reviewer files with ID 97507 from review assignment 27385 could not be found in the database table submission_files
ERROR: Reviewer files with ID 105382 from review assignment 29588 could not be found in the database table submission_files
ERROR: Reviewer files with ID 106371 from review assignment 29694 could not be found in the database table submission_files
ERROR: Reviewer files with ID 109614 from review assignment 30182 could not be found in the database table submission_files
PHP Warning: rename(files/journals/431//articles/21652/submission/review/21652-1009-109846-1-4-20190620.pdf,files/journals/431//articles/216 52/submission/review/attachment/21652-1009-109846-1-5-20190620.pdf): No such file or directory in /home/admin/web/test.ceesprod.mysafeservers .com/public_html/classes/install/Upgrade.inc.php on line 1997
ERROR: Unable to move “files/journals/431//articles/21652/submission/review/21652-1009-109846-1-4-20190620.pdf” to “files/journals/431//artic les/21652/submission/review/attachment/21652-1009-109846-1-5-20190620.pdf”.
ERROR: Reviewer files with ID 110333 from review assignment 30618 could not be found in the database table submission_files
PHP Warning: rename(files/journals/431//articles/21835/submission/review/21835-1009-109986-1-4-20190621.pdf,files/journals/431//articles/218 35/submission/review/attachment/21835-1009-109986-1-5-20190621.pdf): No such file or directory in /home/admin/web/test.ceesprod.mysafeservers .com/public_html/classes/install/Upgrade.inc.php on line 1997
ERROR: Unable to move “files/journals/431//articles/21835/submission/review/21835-1009-109986-1-4-20190621.pdf” to “files/journals/431//artic les/21835/submission/review/attachment/21835-1009-109986-1-5-20190621.pdf”.
PHP Warning: rename(files/journals/431//articles/21652/submission/review/21652-1009-110376-2-4-20190627.pdf,files/journals/431//articles/216 52/submission/review/attachment/21652-1009-110376-2-5-20190627.pdf): No such file or directory in /home/admin/web/test.ceesprod.mysafeservers .com/public_html/classes/install/Upgrade.inc.php on line 1997
ERROR: Unable to move “files/journals/431//articles/21652/submission/review/21652-1009-110376-2-4-20190627.pdf” to “files/journals/431//artic les/21652/submission/review/attachment/21652-1009-110376-2-5-20190627.pdf”.
ERROR: Reviewer files with ID 112699 from review assignment 31251 could not be found in the database table submission_files

[code: Installer Installer::fixAuthorGroup]
[data: dbscripts/xml/upgrade/3.0.0_reviewer_files.xml]
ERROR: Upgrade failed: DB: Column ‘review_round_id’ cannot be null

Hi @Dragoljub_Djordjevic,

For the Column 'review_round_id' cannot be null messages, see Error Upgrade 2.4.8.2 to 3.1.0 - #16 by Adriano_Jose for a discussion and solution.

The other warnings suggest a few missing files and database inconsistencies, but I don’t believe they are causing the upgrade to fail.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks @asmecher;

I have looked to linked topic, but I’am not sure that I have understood it.

I tried to run db query “SELECT ra.review_id, ra.submission_id, ra.reviewer_file_id FROM review_assignments ra WHERE ra.reviewer_file_id IS NOT NULL AND ra.reviewer_file_id NOT IN (SELECT file_id FROM article_files)” and
got 83 rows returned.

Not sure what to do next…?

Hi @Dragoljub_Djordjevic,

Did you try the queries suggested here?

(As always, make sure to take a complete backup before intervening in the database directly.)

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, and that helped me with a different problem. I’ll take a look to both topic again tomorrow, maybe things will be clearer.

I have deleted all records from review_assignment table with reviewer_file_id which is not exists in article_files table.

(Found them with query SELECT ra.review_id, ra.submission_id, ra.reviewer_file_id FROM review_assignments ra WHERE ra.reviewer_file_id IS NOT NULL AND ra.reviewer_file_id NOT IN (SELECT file_id FROM article_files)

But I’am still getting error:

[code: Installer Installer::fixAuthorGroup]
[data: dbscripts/xml/upgrade/3.0.0_reviewer_files.xml]
ERROR: Upgrade failed: DB: Column ‘review_round_id’ cannot be null

No idea what to do next. @bozana, can you mayby help?

Hi @Dragoljub_Djordjevic,

There’s another active thread on the same issue that might be helpful to you: Upgrade from 2.4.6 to 3.1.2-1 Column 'review_round_id' cannot be null

Regards,
Alec Smecher
Public Knowledge Project Team

I have managed to finish upgrade by adding this query to /dbscripts/xml/upgrade/3.0.0_update_xml
delete FROM review_assignments where reviewer_file_id is not null and review_round_id is null

Found 23 records where review_round_id is null, from year 2012-2016.

1 Like