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)
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)
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
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
))
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?
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
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”
@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
I found many tables with this name “MyISAM”
what should I do?
Do I change it to “InnoDB”?
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…
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
Do I change it manually from here???
@jnugent
PLEAESE HELP ME …
@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