Upgrade 16.0.6 to 17.0.1 failed

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 12.0.2): 17.0.1
Operating system and version (eg, Ubuntu 17.04): Ubuntu 18.04
Apache or nginx version (eg, Apache 2.4.25):
PHP version (eg, 7.1): 7.3
Database: MariaDB

The issue you are facing:
Upgrading I am faced with this beauty:

Updating …
Fix broken values of calendar objects

Done
0/0 [>---------------------------] 0%
Doctrine\DBAL\Exception\InvalidFieldNameException: An exception occurred while executing ‘SELECT c.id FROM oc_calendarobjects c LEFT JOIN oc_calendars p ON c.calendarid = p.id WHERE (p.id IS NULL) AND (c.calendartype = ?)’ with params [0]:

SQLSTATE[42S22]: Column not found: 1054 Unknown column ‘c.calendartype’ in ‘where clause’
Update failed

Is this the first time you’ve seen this error? (Y/N): Yes

Steps to replicate it:

  1. Download Nextcloud 17.0.1
  2. occ install

Help would be appreciated.

@Sonnenblume – Welcome.

Sorry to hear of your mishap. Good to learn your install is at PHP 7.3 level already.
:sleepy:

Please be aware, that at early stages of a release (like in other software products) one could find more challenges than expected sometimes. Generally, it seems advisable to start at minor level ‘x.0.2’ or ‘production release’ if you want to avoid the early adopter challenges.

Furthermore, you may find some content suitable to your more general issue, I presume. Naturally, although a first comment in this forum, you could be aware of such aspects and the documentation already.

Happy hacking.
:sunflower:

Check https://github.com/nextcloud/server/issues/17697

I saw that but I didn’t get this part:
“Just had the same problem upgrading from 15.x to 16.0.5 using the downoaded zip.
After rm -r apps core lib updater 3rdparty oc_ calendarobjects.calendartype didn’t get removed any more, and the update went fine. So apparently some old left-over files were harmful.”

What is (s)he doing here? Because running ‘rm -r apps core lib updater 3rdparty’ stops the updater from working (sudo -u www-data php occ upgrade).

Good point. I think they do a manual upgrade: https://docs.nextcloud.com/server/17/admin_manual/maintenance/manual_upgrade.html

I do that as well. That’s why I’ve got the output mentioned in my first post in the first place. Thanks for trying to help btw.

Right, I figured it out. If anyone else has this problem, it’s a bunch of database errors that need fixing, so:

sudo mysql -u root -p

USE nextcloud;

ALTER TABLE oc_calendarobjects ADD COLUMN calendartype int(11) default 0 not null;

ALTER TABLE oc_calendarchanges ADD COLUMN calendartype int(11) default 0 not null;

ALTER TABLE oc_calendarsubscriptions ADD COLUMN synctoken VARCHAR(255);

ALTER TABLE oc_cards ADD COLUMN uid VARCHAR(255);

That did it for me.

2 Likes

Great. Did you consider to add your findings to the a.m. GitHub issue?

Here is some other comment related to my more general approach above in this thread.

Please accept my apologies if it may have looked as if I underestimated your expertise.

I appreciate to learn from your insights and you give good advice.

:warning: However, some kind readers and home users not familiar with dealing in corrections to database entries at SQL level should be warned such ideas can bring trouble if you do not have the appropriate expertise like @Sonnenblume
:innocent:

Happy hacking.
:sunflower:

BTW
Me using the sunflower emoji is just a coincidence and not linked to ‘Sonnenblume’ as an avatar and author of this thread. This forum may be called free but like most types of conversation cannot be free of misunderstandings, I presume.
:face_with_monocle:


@JimmyKater – Please, have a cookie…
:cookie: :+1:

One may have a look at:
:lab_coat:

Still some doubts? Please consider to join the a.m. discussion.
:partying_face:

1 Like

aww no… it’s all good. no needs for excuses and apologies. @Sonnenblume did a great job apparently, solving this issue. and thus i would have never recommended waiting for an update/-grade to him/her.
plus: you have been wise yourself telling users (at another thread) that it nextcloud gmbh would consider x.0.0 and x.0.1-versions as a broader beta-test (without calling it “beta” anymore). at times when even microsoft does that to their home-users (who even paid for this piece of code, at least some of them) by their release-policies with windows 10… it seems to be a common thing doing that.

1 Like