Hello!
I am facing the problem of:: errno: 150 “Foreign key constraint is incorrectly formed” while upgrading from OJS. 3.2.1-4 to OJS 3.3.0-10
As I read, we have to change the engine type in all tables of the DB. (InnoDB)
Done.
I have also read that I have to include the line:
'engine' => 'InnoDB'
in the ojs-3.3.0-10/lib/pkp/classes/core/PKPApplication.inc.php file below the driver.
I have two doubts:
1.- Is it necessary to make the change in both places (DB and File)?
2.- If the answer to the first question is yes, then, would this code be correct? (I don’t know PHP):
210 $capsule->addConnection([
211 'driver' => $driver,
newline **
‘engine’ => ‘InnoDB’`,
212 ‘host’ => Config::getVar(‘database’, ‘host’),
213 ‘database’ => Config::getVar(‘database’, ‘name’),
214 ‘username’ => Config::getVar(‘database’, ‘username’),
215 ‘port’ => Config::getVar(‘database’, ‘port’),
216 ‘unix_socket’=> Config::getVar(‘database’, ‘unix_socket’),
217 ‘password’ => Config::getVar(‘database’, ‘password’),
218 ‘charset’ => Config::getVar(‘i18n’, ‘connection_charset’, ‘utf8’),
219 ‘collation’ => Config::getVar(‘database’, ‘collation’, ‘utf8_general_ci’),
220 ]);
Thanks in advance!
Cristina
ps: Everybody here knows that any change implied a lot of work if it fails…