Upgrade from 10.0.10.4 to 10.2.1.4 - foreign key error

I have a similar error with the oc Docker image.

My running oc Docker instance is 10.0.x with MariaDB

Have attempted to upgrade from 10.0.x to 10.1.x and again in the last week from
10.0.x to 10.2.x

but the same error on oc_persistent_locks occurs with both versions

oc_owncloud | 2019-07-08T05:03:58+00:00 Updating database schema
oc_owncloud | 2019-07-08T05:04:00+00:00 Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘ALTER TABLE oc_persistent_locks ADD CONSTRAINT FK_F0C3D55BC901C6FF FOREIGN KEY (owner_account_id) REFERENCES oc_accounts (id) ON DELETE CASCADE’:
oc_owncloud |
oc_owncloud | SQLSTATE[HY000]: General error: 1005 Can’t create table owncloud.oc_persistent_locks (errno: 150 “Foreign key constraint is incorrectly formed”)
oc_owncloud | 2019-07-08T05:04:00+00:00 Update failed

The DB table oc_persistent_locks gets created but the upgrade process fails when the DDL for the second foreign key gets run.
FK_F0C3D55B93CB796C is created successfully but
FK_F0C3D55BC901C6FF is not

I have also deleted the table but this doesn’t help.

My understanding of the function of oc_persistent_locks is something to do with file handling for Microsoft Office Online Server.


Not something that I care about but would like a solution to the upgrade.