Missing tables and columns after update to 17.0.1

Nextcloud version (eg, 12.0.2): 17.0.1
Operating system and version (eg, Ubuntu 17.04): Linux 5.3.11-arch1-1 GNU/Linux
Apache or nginx version (eg, Apache 2.4.25): Apache/2.4.41
PHP version (eg, 7.1): PHP 7.2.13

The issue you are facing:
After upgrading from 16 to 17 calendar and contacts did no longer show anything due to missing tables oc_dav_cal_proxy & oc_calendar_reminders and also colums oc_cards: uid , oc_calendarsubscriptions: synctoken & oc_calendarchanges: calendartype.

Fix:
After checking apps/dav/lib/Migration/ I manually fixed the tables for now…

CREATE TABLE oc_dav_cal_proxy (
id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
owner_id VARCHAR(255) NOT NULL,
proxy_id VARCHAR(255) NOT NULL,
permissions BIGINT(20) UNSIGNED
);
ALTER TABLE oc_cards ADD uid VARCHAR(255) NOT NULL;
CREATE TABLE oc_calendar_reminders (
id BIGINT(20) UNSIGNED AUTO_INCREMENT PRIMARY KEY NOT NULL,
calendar_id BIGINT(20) NOT NULL,
object_id BIGINT(20) NOT NULL,
is_recurring SMALLINT(1) NOT NULL,
uid VARCHAR(255) NOT NULL,
recurrence_id BIGINT(20) UNSIGNED NOT NULL,
is_recurrence_exception SMALLINT(1) NOT NULL,
event_hash VARCHAR(255) NOT NULL,
alarm_hash VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
is_relative SMALLINT(1) NOT NULL,
notification_date BIGINT(20) UNSIGNED NOT NULL,
is_repeat_based SMALLINT(1) NOT NULL
);
CREATE INDEX oc_calendar_reminder_objid ON oc_calendar_reminders (object_id);
CREATE INDEX oc_calendar_reminder_uidrec ON oc_calendar_reminders (uid, recurrence_id);
ALTER TABLE oc_calendarsubscriptions ADD synctoken INT(10);
ALTER TABLE oc_calendarchanges add calendartype INT(10) NOT NULL DEFAULT 0;

also had to run occ dav:sync-birthday-calendar

1 Like