Owncloud-Update auf Version 9: table already exists

Ich habe eine owncloud-Installation auf ubuntu 14.4.
Die kleineren Updates werden von “unattanted upgrades” automatisch und reibungslos installiert
Bei Verisonsupdates reicht meistens ein apt-get upgrade owncloud.

Diesmal hat er mich aber aufgefordert das Upgrade manuell durchzuführen. Hier habe ich nachgelesen, wie das geht und für mich “übersetzt”:

cd /var/www/owncloud && sudo -u www-data php occ upgrade

Leider habe ich heute beim Upgrade auf owncloud 9.0.0 eine Fehlermeldung bekommen:

Set log level to debug
Checking whether the database schema can be updated (this can take a long time depending on the database size)
Checked database schema update
Checking updates of apps
Checked database schema update for apps
Updating database schema
Updated database
Doctrine\DBAL\Exception\TableExistsException: An exception occurred while executing 'CREATE TABLE "oc_notifications" ("notification_id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "app" VARCHAR(32) NOT NULL, "user" VARCHAR(64) NOT NULL, "timestamp" INTEGER DEFAULT 0 NOT NULL, "object_type" VARCHAR(64) NOT NULL, "object_id" VARCHAR(64) NOT NULL, "subject" VARCHAR(64) NOT NULL, "subject_parameters" CLOB DEFAULT NULL, "message" VARCHAR(64) DEFAULT NULL, "message_parameters" CLOB DEFAULT NULL, "link" VARCHAR(4000) DEFAULT NULL, "actions" CLOB DEFAULT NULL)':

SQLSTATE[HY000]: General error: 1 table "oc_notifications" already exists
Update failed
Maintenance mode is kept active
Reset log level

Etwas googlen hat mich dazu gebracht, dass es helfen könnte die “überflüssige” Tabelle zu löschen:

sqlite3 /srv/ownclouddata/owncloud.db
sqlite> select * from oc_notifications;
sqlite> drop table oc_notifications;

(Ja ich weiß, ich sollte mal auf mysql umstellen…)

Danach nochmal das ...occ upgrade. Klappt.

Nun noch den “Maintenance mode” abschalten:

cd /var/www/owncloud && sudo -u www-data php occ maintenance:mode --off

Danach war alles wieder gut.

BTW. Ich Verwende folgende Paketquelle:

# cat /etc/apt/sources.list.d/owncloud.list
deb http://download.owncloud.org/download/repositories/stable/Ubuntu_14.04/ /

One thought on “Owncloud-Update auf Version 9: table already exists

Schreibe einen Kommentar

Deine E-Mail-Adresse wird nicht veröffentlicht. Erforderliche Felder sind mit * markiert