Closed jonasraoni closed 1 year ago
During the upgrade to 3.3.0 there should be a FOREIGN KEY
constraint added on submission_files.file_id
constrained to files.file_id
. However, it was added without an ON DELETE CASCADE
clause, so the I8073_RemoveNotesWithoutQueriesAndRelatedObjects
migration drops the constraint and adds it with the missing clause.
If the submission_files_file_id_foreign
constraint is missing on a 3.3.0-x database, suspect it means the upgrade to 3.3.0 wasn't run successfully. I don't mind accommodating out-of-spec databases if it's quick and easy to do, but it's not a priority.
It's a simple fix. As the problem already happened with a user under a small test coverage, I think it's better to fix anything suspect to avoid new reports/forum threads.
And about this specific case, the user HAD the constraint on his database. But instead of trying to find why it doesn't exist at this point, I decided to just add a cheap patch (which I still think it's ok) and move forward to the next issue.
Merged all, thanks!
Describe the bug The migration
I8073_RemoveNotesWithoutQueriesAndRelatedObjects
is attempting to drop some foreign keys, but looks like they might not exist.In fact, the user had the constraint in place (perhaps before the upgrade) and perhaps one of the operations ended up dropping it before it reached the migration mentioned above, difficult to simulate without the original dataset.
See trace below:
What application are you using? OJS 3.4.0rc3
Additional information Source: https://github.com/pkp/pkp-lib/issues/8929