Migration from ownCloud 10.0.7 to Nextcloud 12.0.6 failed


I’ve been waiting forever for a migration path from ownCloud to Nextcloud and finally with version 12.0.6 one opened… and very promptly failed.

The server is running on Ubuntu 16.04 server with mysql 5.7.

This is the error, as shown by the nextcloud web interface:

Preparing update
Set log level to debug
Turned on maintenance mode
Updating database schema
Doctrine\DBAL\Exception\DriverException: An exception occurred while executing ‘ALTER TABLE oc_filecache CHANGE fileid fileid INT AUTO_INCREMENT NOT NULL, CHANGE parent parent INT DEFAULT 0 NOT NULL, CHANGE mtime mtime INT DEFAULT 0 NOT NULL, CHANGE storage_mtime storage_mtime INT DEFAULT 0 NOT NULL’: SQLSTATE[22003]: Numeric value out of range: 1264 Out of range value for column ‘mtime’ at row 16

The error looks exactly like the one described here: https://github.com/nextcloud/server/issues/8143 only I’m not doing a database migration at all. It also looks like there’s no interest in fixing it before NC14.

Any ideas how I can make the migration happen?

Thank you very much for any assistance.

Good question. I asked there. Normally I would say if there are so little changes (and you have made a full backup anyway), that you could try to apply these changes manually. But because they seem to have concerns, let’s wait for the developers to answer.

The migration to Nextcloud is like an upgrade in ownCloud and during such upgrades, the database structure can change.

I have now had a little time to get back to this and, looking at my database, I had a few entries in oc_filecache with mtime in 2099 (unix timestamp 4075736783). This is due to my Proxmox server, which the VM with owncloud is running on, having at one point set its time to that year for some reason.

I will correct the mtime entries and try the migration again this weekend. I will report back how it went, though I’m sure it’ll be all right this time. :slight_smile:

I corrected the mtime entries in the db and this time the migration to NC 12.0.7 went without a hitch! I then upgraded to 13.0.2 using the web interface and am finally on Nextcloud.

Thank you for your willingness to look into it tflidd.