Hi @Tarcisio_Pereira,
I tried re-running your upgrade with a new copy of the database. Just in case it’s useful, it’s much quicker to run a test migration if you remove some of the table data from the dump – in particular, the full-text index and metrics. I did this by filtering your database dump and creating a leaner one:
zcat full_database_dump.sql.gz | sed -e '/^COPY metrics/,/^$/d' -e '/^COPY article_search_/,/^$/d' | gzip -9 > database_dump_trimmed.sql.gz
This dropped the database dump down from 2GB to 300MB; testing the upgrade process is massively sped up.
In the process I identified an issue that was slowing down the upgrade and resulting in some incorrect data – the patch there will resolve the issue during upgrade, and I’m working on code that’ll correct any bad data that got introduced. However, I the only effect you’d observe from this is a slow upgrade; patching it should speed up the role migration part of the upgrade.
In my latest test, I no longer get the error you first quoted. Now I get:
PHP Warning: assert(): Assertion failed in /home/asmecher/git/ojs/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php on line 134
PHP Stack trace:
PHP 1. {main}() /home/asmecher/git/ojs/tools/upgrade.php:0
PHP 2. UpgradeTool->execute() /home/asmecher/git/ojs/tools/upgrade.php:34
PHP 3. UpgradeTool->upgrade() /home/asmecher/git/ojs/lib/pkp/classes/cliTool/UpgradeTool.inc.php:64
PHP 4. Installer->execute() /home/asmecher/git/ojs/lib/pkp/classes/cliTool/UpgradeTool.inc.php:88
PHP 5. Installer->executeInstaller() /home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:186
PHP 6. Installer->executeAction() /home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:265
PHP 7. call_user_func:{/home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:415}() /home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:415
PHP 8. Upgrade->convertSupplementaryFiles() /home/asmecher/git/ojs/lib/pkp/classes/install/Installer.inc.php:415
PHP 9. PKPSubmissionFileDAO->updateObject() /home/asmecher/git/ojs/classes/install/Upgrade.inc.php:1319
PHP 10. SupplementaryFileDAODelegate->insertObject() /home/asmecher/git/ojs/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php:390
PHP 11. SubmissionFileDAODelegate->insertObject() /home/asmecher/git/ojs/lib/pkp/classes/submission/SupplementaryFileDAODelegate.inc.php:42
PHP 12. assert() /home/asmecher/git/ojs/lib/pkp/classes/submission/SubmissionFileDAODelegate.inc.php:134
<h1>DB Error: ERROR: null value in column "file_id" violates not-null constraint
DETAIL: Failing row contains (128282, en_US, 68234, null, Untitled, 9, RemoteURL, 0).</h1>ojs2: DB Error: ERROR: null value in column "file_id" violates not-null constraint
DETAIL: Failing row contains (128282, en_US, 68234, null, Untitled, 9, RemoteURL, 0).
It looks like you have some further data problems that might be related – for example, entries in article_supplementary_files
that refer to entries in article_files
(by file_id
) where the article_files
entry is missing:
select count(*) from article_supplementary_files s LEFT JOIN article_files f ON (f.file_id = s.file_id) WHERE f.file_id IS NULL;
I would suggest reviewing and correcting these.
Regards,
Alec Smecher
Public Knowledge Project Team