Today I attempted to migrate from ownCloud 10.0.10 to Nextcloud 12.0.13 following the manual process instructions here:
Unfortunately I received the following error.
# su apache -s /bin/bash -c '/opt/rh/rh-php71/root/bin/php /domains/example.com/occ upgrade'
Nextcloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Doctrine\DBAL\Exception\ForeignKeyConstraintViolationException: An exception occurred while executing 'DROP TABLE oc_accounts':
SQLSTATE: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails
Maintenance mode is kept active
Reset log level
I was hoping perhaps someone might be able to point me in the right direction on how to resolve this.
Let me know if any further information is required.
This is not the answer of your question but I would not try to migrate to an unsupported
Nextcloud version. You should better try to mirate directly to Nextcloud 14.x/15.x, because
these are supported versions.
That is not the recommended migration path. Quoting from the article: ‘You can update from ownCloud 10.0.10 and older to Nextcloud 12.0.12 after which you can use our update to move to a newer Nextcloud release’.
Reading that back now perhaps I should try 12.0.12 instead of 12.0.13?
All I can say is, that this query returns an Empty set on my two nextcloud instances. So it looks like it is not needed by nextcloud. Maybe, create a database dump first, drop this constraint and then have a look if the migration runs through successfully