Upgrade error "Base table or view already exists" from to

When upgrading ojs to to, i have this error :
“ERROR: Upgrade failed: DB: PDOException: SQLSTATE[42S01]: Base table or view already exists: 1050 Table ‘files’ already exists in /var/sites/ojs/lib/pkp/lib/vendor/doctrine/dbal/lib/Doctrine/DBAL/Driver/PDOStatement.php:115”.

In this post, the same problem is reported :

I followed your advices but the same error persist. The server is installed with php7.3 and mariadb 15.1 and ojs is installed since 2.4.2 version with several upgrades without problems.

I also followed these advices :

Have you got any ideas to help me advanced ?


I was able to move forward with this database upgrade error.

When trying to change engine tables from myisam to innodb, mariadb gives an error when processing “submission_file_revisions” table.

The foreign key constraint “submission_file_revisions_submission_file_id_foreign” references the field “submission_file_id” on “submission_files” table. This field “submission_file_id” doesn’t exist in “submission_files” table in our database.

Is this only a problem in our local database or other users have the same problem ?

I’ll try to drop this foreign key temporarily to make the upgrade.


1 Like

You can ignore my previous message.

The problem came from the reset of the database, after upgrade tries.
I used this command : $ mysql -u user -p ojs < …/ojs.sql

The new tables created by the failed upgrade was not removed with this command and the new upgrade failed too.

I thought the database was reset, and it was not.

So the upgrade is successful (after processing the database from myisam to innodb)


1 Like

This topic was automatically closed after 4 days. New replies are no longer allowed.