hello, I am trying to upgrade my OJS 3.1.1.4 to 3.3.0.7 but failed. I at least attempted 30 times but fail.
currently using PHP 7.3.26
mysql 5.X
Steps I took leading up to the issue:
in start it failed and on second attempt it shows some table already exists e.g author_temp, users_temp.
A database error has occurred: SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘users_tmp’ already exists (SQL: CREATE TABLE users_tmp AS (SELECT user_id, first_name, last_name, middle_name, salutation, suffix FROM users) )
on next attempt after restoring DB and removing temp_xxx tables
now it playing game like once it said
2nd Last Attept : A database error has occurred: SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘navigation_menus’ already exists (SQL: CREATE TABLE navigation_menus ( navigation_menu_id BIGINT NOT NULL AUTO_INCREMENT, context_id BIGINT NOT NULL, area_name VARCHAR(255) DEFAULT ‘’, title VARCHAR(255) NOT NULL, PRIMARY KEY (navigation_menu_id) ))
next time it will raise same error but with different table name like "citations, Notes, Publications etc.
if I removed one table which causing error as mentioned above
next time it will raise same error but with different table name like "citations, Notes, Publications etc.
Last Attempt:
A database error has occurred: SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘submissions’ already exists (SQL: CREATE TABLE submissions ( submission_id BIGINT NOT NULL AUTO_INCREMENT, locale VARCHAR(14), context_id BIGINT NOT NULL, section_id BIGINT, current_publication_id BIGINT, date_last_activity DATETIME, date_submitted DATETIME, last_modified DATETIME, stage_id BIGINT NOT NULL DEFAULT 1, status TINYINT NOT NULL DEFAULT 1, submission_progress TINYINT NOT NULL DEFAULT 1, work_type TINYINT DEFAULT 0, PRIMARY KEY (submission_id) ))
Application Version OJS 3.1.1.4 and want to upgrade 3.3.0.7
Please help me out. i did not upgrade from last 3 year due to theses complications.
It looks like your running the upgrade script without restoring your previous database first. If the upgrade fails you need to drop ALL of the tables and then restore because the upgrade creates new tables. If you restore your db without dropping all the tables you’ll get those types of errors. In addition to backing up and restoring your db, you should be doing the same with your file folder because the upgrade rearranges files and directories.
As Bart explained, you can not run an upgrade over a partially upgraded ojs… you need to recover your backup version and start again.
You also need to know that you can not upgrade directly from 3.1.1.4 to 3.3… you need to upgrade to 3.2.1 first and then you can jump directly to 3.3.0-7.
The recommended upgrade route is: 2.x > 2.4.8-5 > 3.1.2-4 > 3.2.1-4 > 3.3.x-x
If you have some experience with docker, take a look to this link.
I am restoring DB from backup but not all other files. means not unzip ojs-3.3.0-7.tar.gz. and I don’t think it will work for me as all issues till now are relating to DB.
I also tried new mysql DB 8.X, restore data in it and update, after 5 to six minutes it raise internal server error 500
@asmecher Is there any way if some one lost the database/backup original with 3.1? after failed attempts it changed and not available in actual form now. then what is the solution for upgradation?