Upgrade ojs from 3.1.2.4 to 3.3.0.4

upgrad ojs from 3.1.2.4 to 3.3.0.4

Errors occurred during installation :

A database error has occurred: SQLSTATE[42S21]: Column already exists: 1060 Nom du champ ‘email_id’ déjà utilisé (SQL: ALTER TABLE email_templates_data ADD email_id BIGINT)

upgrade ojs from 3.1.2.4 to 3.3.0.4

Hi @rebas_saber

This looks like a previous upgrade attempt failed and the upgrade was tried again, without restoring from backup first. There is no email_id column on the email_templates_data table in 3.1.2. I would recommend restoring from a backup and trying again.

Best,
Jason

Hi @jnugent

I restored a backup, and tried again, but this error appears :slight_smile:

Errors occurred during installation:

A database error has occurred: SQLSTATE[HY000]: General error: 1005 Ne peut créer la table mbmjorg2_ojs3.submission_files (Errcode: 150 “Foreign key constraint is incorrectly formed”) (SQL: alter table submission_files add constraint submission_files_file_id_foreign foreign key (file_id) references files (file_id))

ERROR 2

Hi @rebas_saber

This could be a number of things. The first thing is to ensure that the MySQL user account you are using has the REFERENCES privilege, in order to create foreign keys, and to also ensure that all of your database tables are InnoDB, not MyISAM.

Best
Jason

Hi @jnugent

This is my all users database (i use “root” without password, and with all privileges)
what should I do?

16172782248457918806084385831885

It’s probably the database table then. Can I see the table type definitions for your tables?

By the way, I assume that this is not an installation running on a publicly available server. Using “root” with no password is very, very insecure. I strongly suggest you configure a password for your installations.

Best
Jason

Yes this is localhost server
I use database number : 9 see photo

16172846806945589117583621441280

No, please actually go into the database and show me some of the tables in there. You’ll see a column with a word like “MyISAM” or “InnoDB”.

thanks,
Jason

YES ITS “InnoDB”

ERROR 3

@jnugent Please help me as soon as possible, thank you.

Honestly, at this point I’m not sure. If all of your tables are InnoDB, the possibility exists that the two fields being used in the foreign key relationship are not identically defined. But figuring that out is probably beyond the scope of the support I can provide here on the forum.

You may want to try an intermediate upgrade to 3.2.1 first, and then go to 3.3.0-4.

Cheers,
Jason

Hi @rebas_saber,

Double-check your screenshot – I see at least one table listed as MyISAM.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @jnugent @asmecher

I found many tables with this name “MyISAM”
what should I do?
Do I change it to “InnoDB”?

16173508362433931864985989175242

Following, facing same issue while upgrading from ojs-3.1.2-4 to ojs-3.3.0-4.

One more thing in my ojs-3.1.2-4 old installation table email_templates_data missing in DB and till now we didn’t face any issue while running. But when we are trying to upgrade it says table missing. Any idea how to create in new upgrade or we can reset email template and then is it possible to create…

Hi @Editor_Granthaalayah

Can you please post this as a new topic? thanks!

Jason

First, thanks @asmecher - I didn’t see that table lurking down at the bottom.

@rebas_saber, yes, you’ll need to convert all of these tables to InnoDB before running the upgrade. You cannot create foreign keys on a MyISAM table.

Cheers,
Jason

16173774920668817222289508912400

Do I change it manually from here???

@jnugent
PLEAESE HELP ME :pray:

@rebas_saber It’s Easter weekend and I am spending time with my family until Monday. But yes, that would work. You’ll need to do it for all of the MyISAM tables.

Cheers,
Jason