“2023-09-13 17:18:05 [error while downgrading “APP\migration\upgrade\v3_4_0\I3573_AddPrimaryKeys”: SQLSTATE[HY000]: General error: 1553 Cannot drop index ‘review_form_responses_unique’: needed in a foreign key constraint (SQL: alter table review_form_responses drop index review_form_responses_unique)]
ERROR: Upgrade failed: DB: SQLSTATE[42000]: Syntax error or access violation: 1280 Incorrect index name ‘sections_review_form_id’ (SQL: alter table sections add index sections_review_form_id(review_form_id))”
when running the upgrade script.
I have run the upgrade multiple times and reverted back to the original when the upgrade fails. Is there a version that I should upgrade to then upgrade to 3.4.xxxx? It seems the database does not have the sections_review_form_id column. Is there a workaround for this another route to the upgrade?
I am trying to upgrade from OJS 3.3.0-11 to 3.4.0.3.
When I rerun the upgrade, it upgrades me the database to 3.3.9.9 but then another error is thrown.
I upgraded to 3.3.0-15 quite smoothly, but can’t make the step to 3.4., so for now I’m staying on the 3.3. LTS version until we figure out what is blocking the upgrade.
Is your OJS install upgraded from the 2.4.8. version, or did you start fresh with OJS 3? I’m upgrading from 2.4.8-5 to 3.2.1-4 to 3.3.0-15 and I suspect there are some leftovers from OJS 2.4 in the database that are making problems in the 3.4 upgrade.
What I didn’t try yet is to upgrade to 3.4.0-0 first. I remember that I got different errors when I tried to upgrade 3.2.1-4 to 3.4.0-1, but I don’t remember what was the problem then.
Thanks for the reply. We’ve never had a version 2 installed. Our update schedule from the system information page has been:
|3.3.0.11
|3.3.0.10
|3.3.0.8
|3.3.0.7
|3.3.0.6
|3.1.2.0
|3.1.1.4
|3.1.0.1
|3.0.2.0
This is the first time we’ve had any issues upgrading a minor release version. I may also give 3.4.0-0 a try.
The same error here, while trying to upgrade ver. 3.3.0-14 to 3.4.0-3:
[error while downgrading “APP\migration\upgrade\v3_4_0\I3573_AddPrimaryKeys”: SQLSTATE[HY000]: General error: 1553 Cannot drop index ‘review_form_responses_unique’: needed in a foreign key constraint (SQL: alter table review_form_responses drop index review_form_responses_unique)]
ERROR: Upgrade failed: DB: SQLSTATE[42000]: Syntax error or access violation: 1280 Incorrect index name ‘sections_review_form_id’ (SQL: alter table sections add index sections_review_form_id(review_form_id))
The actual error message is probably in the log just before what you’ve quoted; the error you’ve quoted is happening during some attempted clean-up after the upgrade already failed. Can you quote a bit more of the upgrade output?
Regards,
Alec Smecher
Public Knowledge Project Team
I have checked the server logs but they were empty… They are on but chances are they might be cleaned. Those were the last lines returned by the update script, after ca. 3 hours of its running (during the run it output various clean-up activities, with three of them lasting ca. 1 hour each). Nothing else appeared except the normal command line. Will have to try again, but maybe somebody might share some tips related to the errors received?
I run the update script with php 8.2 just in case.
I have the same problem here, upgrading from OJS 3.3.0-11 to 3.4.0-3:
2023-10-13 09:15:50 [migration: APP\migration\upgrade\v3_4_0\I6091_AddFilterNamespaces]
2023-10-13 09:15:50 [migration: APP\migration\upgrade\v3_4_0\I3573_AddPrimaryKeys]
2023-10-13 09:16:50 [migration: APP\migration\upgrade\v3_4_0\I6093_AddForeignKeys]
2023-10-13 09:17:17 [revert migration: APP\migration\upgrade\v3_4_0\I3573_AddPrimaryKeys]
2023-10-13 09:18:04 [error while downgrading "APP\migration\upgrade\v3_4_0\I3573_AddPrimaryKeys": SQLSTATE[HY000]: General error: 1553 Cannot drop index 'review_form_responses_unique': needed in a foreign key constraint (SQL: alter table `review_form_responses` drop index `review_form_responses_unique`)]
ERROR: Upgrade failed: DB: SQLSTATE[HY000]: General error: 1114 The table '#sql-441_ae3' is full (SQL: alter table `submission_search_object_keywords` add constraint `submission_search_object_keywords_object_id_foreign` foreign key (`object_id`) references `submission_search_objects` (`object_id`) on delete cascade)
ERROR: Upgrade failed: DB: SQLSTATE[HY000]: General error: 1114 The table '#sql-441_ae3' is full
(SQL: alter table `submission_search_object_keywords` add constraint `submission_search_object_keywords_object_id_foreign` foreign key (`object_id`) references `submission_search_objects` (`object_id`) on delete cascade)
This means that MySQL ran out of disk space or hit a table size limit while trying to add a constraint to submission_search_objects.
If you don’t know how to resolve that at the MySQL level, you could try…
Restore your 3.3.0-x to working condition from backup
Delete the article search index using the following SQL:
DELETE FROM submission_search_keyword_list;
DELETE FROM submission_search_object_keywords;
DELETE FROM submission_search_objects;
Run the upgrade process
Re-generate the search index using the command line:
php tools/rebuildSearchIndex.php
Regards,
Alec Smecher
Public Knowledge Project Team