Ready-to-run nextcloud installation
Upgrade/Migration fails, leaves DB in unusable state.
2017-12-05T19:39:21+00:00 Set log level to debug
2017-12-05T19:39:21+00:00 Repair step: Repair MySQL collation
2017-12-05T19:39:21+00:00 Repair info: Not a mysql database -> nothing to do
2017-12-05T19:39:21+00:00 Repair step: Repair SQLite autoincrement
2017-12-05T19:39:21+00:00 Repair step: Copy data from accounts table when migrating from ownCloud
2017-12-05T19:39:21+00:00 Repair step: Drop account terms table when migrating from ownCloud
2017-12-05T19:39:21+00:00 Updating database schema
2017-12-05T19:39:22+00:00 Doctrine\DBAL\Exception\DriverException: An exception occurred while executing 'ALTER TABLE oc_filecache ALTER fileid TYPE SERIAL':
SQLSTATE[42704]: Undefined object: 7 ERROR: type "serial" does not exist
2017-12-05T19:39:22+00:00 Update failed
2017-12-05T19:39:22+00:00 Maintenance mode is kept active
2017-12-05T19:39:22+00:00 Reset log level
Operating system: Gentoo Linux
Web server: Apache2.4.27
Database: Postgresql 9.6.6
PHP version: PHP 5.6.32
Nextcloud version: 12.0.4
Updated from an older Nextcloud/ownCloud or fresh install: from owncloud 10.0.3
Where did you install Nextcloud from: shell/occ
List of activated apps:
App list
Enabled:
Are you using encryption: no
I've got the same issue
Ran into this issue as well. Rolled back to OwnCloud for now.
I've got the same issue
Me too. :-(
@nickvergessen Mind to have a look?
It's an issue with bigint handling from doctrine on postgres:
https://github.com/nextcloud/server/issues/4504#issuecomment-354416206
We fixed that for 13:
https://github.com/nextcloud/server/pull/6563/files#diff-e624a0e946331a052958be7dac537569
Ok, so now when I try to upgrade from ownCloud 10.0.4 to Nextcloud 13, occ upgrade says:
Exception: Updates between multiple major versions and downgrades are unsupported.
Update failed
How should I proceed? Wait for ownCloud 11 and try again?
@haggl just did today a OC 10.0.4 to NC 12 migration and then NC 13 upgrade.
Had to do some query like described here : https://github.com/nextcloud/server/issues/4504#issuecomment-364741491
Also had to do this one for clients synchronisation : https://github.com/nextcloud/server/issues/8084
@nsteinmetz Thank you so much! Worked perfectly. Interestingly I needed to alter only few tables:
alter table oc_filecache alter fileid TYPE int;
alter table oc_properties alter id TYPE int;
alter table oc_activity alter activity_id TYPE int;
alter table oc_activity_mq alter mail_id TYPE int;
alter table oc_share_external alter id TYPE int;
Ok, so now when I try to upgrade from ownCloud 10.0.4 to Nextcloud 13, occ upgrade says:
Correct - And upgrade from OC 10 is only possible via Nextcloud 12 and then an upgrade to 13.
yeah but you can not upgrade to 12 because of the missing table alterations....
@ingwinlu you can do them before launching the upgrade ;-)
You were too fast I just wanted to edit the comment to sound less whiny ;).
What I would have loved to see is a patch to nextcloud 12 to run those changes during the 'normal' update procedure. That way I would not have had to manually figure out my postgres setup again and run those alterations manually.
I now upgraded to 12 successfully as well.
Add one migration:
alter table oc_files_trash alter auto_id TYPE int;
This is a nonsense. When migrating from owncloud, you have to migrate to nextcloud 12 before bumping to the latest version. At the same time, nextcloud 12 is obsolete and buggy.
For updating/migrating 12 is still supported. But yeah it's on our list to create a more recent update path. But it's also kind of hard to make sure all edge cases are converted correctly because after nextcloud 12/owncloud 9.2/10 it diverged more and more
Maybe it makes more sense to promote v12 as a limited support version, only as a step in upgrade path? E.g. release a new version of 12.999.0 that is guaranteed to work with any PHP version (up to 7.4.x) and always have backports for anything that is needed for a migration to 12 to succeed, and nothing more.