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[23000]: Integrity constraint violation: 1217 Cannot delete or update a parent row: a foreign key constraint fails
Update failed
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
The oc_persistent_locks had two constraints the one above on oc_accounts and another on oc_filecache. I had to drop both of them for the migration script to complete successfully.
Over the next few weekends I will update Nextcloud to a supported version.
Hello
I have the same issue,
OCloud was installed (10.14.0)
i try to upgrade Nextcloud
(using my old OC config/data files) php ./occ upgrade
So I try
SELECT TABLE_NAME,COLUMN_NAME,CONSTRAINT_NAME, REFERENCED_TABLE_NAME,REFERENCED_COLUMN_NAME
-> FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE
-> WHERE REFERENCED_TABLE_SCHEMA = 'owncloud' AND REFERENCED_TABLE_NAME = 'oc_accounts';
But no line affected.
How to reproduce ?
[EDIT]
SELECT CONSTRAINT_NAME FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE WHERE REFERENCED_TABLE_SCHEMA = 'serendipvspip'