Describe the issue or problem
I’m upgrading a journal from ojs 3.3 to ojs 3.4.0.14 - unfortunately I receive an error where I can’t figure out how to continue.
Steps I took leading up to the issue
For example:
- I created a docker image for OJS 3.4.0.3 (setting up a new journal works fine)
- adjust config.inc.php to point to the database, place contents of old public and files folders
- use the command
php tools/upgrade.php upgrade
- wait for a few minutes
Get the error:
A database error has occurred: SQLSTATE[22P02]: Invalid text representation: 7 ERROR: invalid input syntax for type bigint: "" CONTEXT: unnamed portal parameter $2 = '' (SQL: update "dois" set "status" = 3 where "doi_id" = )
the database then is in a broken state and needs to be recovered from backup.
What application are you using?
OJS 3.3.0-14
Additional information
In case it matters this journal was originally created some years ago by someone else under OJS 2 and gradually upgraded to ojs 3.3. Database is postgres9. Currently seems to run fine. It originally shared the server with several other journals which have moved to separate installations.
output php tools/upgrade.php check
:
php tools/upgrade.php check
Code version: 3.4.0.3
Database version: 3.3.0.14
Latest version: 3.4.0.3
Database version is older than code version
Run "tools/upgrade.php upgrade" to update
I had some more issues that had a clear message how to resolve:
- one complaining about files in
usageStats/usageEventLogs
- the message said to delete them - one about setting Contact name and email for journal “test”.
some more log lines in context: (truncated as there is a looong list of removed entries)
...
2023-11-14 10:34:15 [334732 entries removed]
2023-11-14 10:34:15 [Removing orphaned entries from "user_user_groups" with an invalid value for the required column "user_id". The following IDs do not exist at the reference table "users":
1720, 1722]
2023-11-14 10:34:15 [4 entries removed]
2023-11-14 10:34:15 [Removing orphaned entries from "completed_payments" with an invalid value for the required column "context_id". The following IDs do not exist at the reference table "journals":
10, 16]
2023-11-14 10:34:15 [34 entries removed]
2023-11-14 10:34:15 [Removing orphaned entries from "publication_galley_settings" with an invalid value for the required column "galley_id". The following IDs do not exist at the reference table "publication_galleys":
2260, 2286, 2297, 2302, 2394, 2417, 2418, 2419, 2422, 2423]
2023-11-14 10:34:15 [17 entries removed]
2023-11-14 10:34:15 [migration: PKP\migration\upgrade\v3_4_0\I8060_UpdateUserLocalesDefaultToEmptyArrayFromNull]
2023-11-14 10:34:15 [migration: PKP\migration\upgrade\v3_4_0\I7245_UpdateUserLocaleStringToParsableJsonString]
2023-11-14 10:34:20 [migration: APP\migration\upgrade\v3_4_0\I7129_IssueEntityDAORefactor]
2023-11-14 10:34:20 [migration: APP\migration\upgrade\v3_4_0\I6091_AddFilterNamespaces]
2023-11-14 10:34:20 [migration: APP\migration\upgrade\v3_4_0\I3573_AddPrimaryKeys]
2023-11-14 10:34:23 [migration: APP\migration\upgrade\v3_4_0\I6093_AddForeignKeys]
2023-11-14 10:34:24 [migration: APP\migration\upgrade\v3_4_0\MergeLocalesMigration]
2023-11-14 10:34:44 [migration: PKP\migration\upgrade\v3_4_0\FailedJobsMigration]