Skip to content

Upgrade from 8.2.3 to 9.0.1 result in some errors (table already exist) #23867

@rpelissi

Description

@rpelissi

Steps to reproduce

  1. Install owncloud on centos 7.2 and mariodb on another server, php 5.5.34 and ldap
  2. Try to upgrade from 8.2.3 to 9.0.1
    3.

Expected behaviour

Upgrade should works (at least the installer should detect that the tables already exist and update them instead of trying to create them)

Actual behaviour

Upgrade fail because of some mysql error messages

Server configuration

Operating system: Centos 7.2

Web server:
Apache

Database:
mariadb 10.10.22

PHP version:
5.5.34

ownCloud version: (see ownCloud admin page)
8.2.3

Updated from an older ownCloud or fresh install:
yes

Where did you install ownCloud from:

Signing status (ownCloud 9.0 and above):

Login as admin user into your ownCloud and access 
http://example.com/index.php/settings/integrity/failed 
paste the results here.

List of activated apps:

If you have access to your command line run e.g.:
sudo -u www-data php occ app:list
from within your ownCloud installation folder

The content of config/config.php:

If you have access to your command line run e.g.:
sudo -u www-data php occ config:list system
from within your ownCloud installation folder

or 

Insert your config.php content here
(Without the database password, passwordsalt and secret)

Are you using external storage, if yes which one: local/smb/sftp/...

Are you using encryption: yes/no

Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...

LDAP configuration (delete this part if not used)

With access to your command line run e.g.:
sudo -u www-data php occ ldap:show-config
from within your ownCloud installation folder

Without access to your command line download the data/owncloud.db to your local
computer or access your SQL server remotely and run the select query:
SELECT * FROM `oc_appconfig` WHERE `appid` = 'user_ldap';


Eventually replace sensitive data as the name/IP-address of your LDAP server or groups.

Client configuration

Browser:

Operating system:

Logs

Here are the logs from the upgrade:

bash-4.2$ ./occ upgrade
ownCloud or one of the apps require upgrade - only a limited number of commands are available
You may use your browser or the occ upgrade command to do the upgrade
Set log level to debug
Turned on maintenance mode
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
Checking whether the database schema for <activity> can be updated (this can take a long time depending on the database size)
Checking whether the database schema for <files_sharing> can be updated (this can take a long time depending on the database size)
Checking whether the database schema for <user_ldap> can be updated (this can take a long time depending on the database size)
Checked database schema update for apps
Updating database schema
Updated database
Updating <files_pdfviewer> ...
Updated <files_pdfviewer> to 0.8
Updating <files_texteditor> ...
Updated <files_texteditor> to 2.1
Updating <gallery> ...
Updated <gallery> to 14.5.0
Updating <user_ldap> ...
Updated <user_ldap> to 0.8.0
Updating <files> ...
Updated <files> to 1.4.4
Updating <activity> ...
Updated <activity> to 2.2.1
Updating <files_sharing> ...
Updated <files_sharing> to 0.9.1
Updating <files_versions> ...
Updated <files_versions> to 1.2.0
notifications: An exception occurred while executing 'CREATE TABLE `oc_notifications` (`notification_id` INT AUTO_INCREMENT NOT NULL, `app` VARCHAR(32) NOT NULL, `user` VARCHAR(64) NOT NULL, `timestamp` INT DEFAULT 0 NOT NULL, `object_type` VARCHAR(64) NOT NULL, `object_id` VARCHAR(64) NOT NULL, `subject` VARCHAR(64) NOT NULL, `subject_parameters` LONGTEXT DEFAULT NULL, `message` VARCHAR(64) DEFAULT NULL, `message_parameters` LONGTEXT DEFAULT NULL, `link` VARCHAR(4000) DEFAULT NULL, `actions` LONGTEXT DEFAULT NULL, INDEX oc_notifications_app (`app`), INDEX oc_notifications_user (`user`), INDEX oc_notifications_timestamp (`timestamp`), INDEX oc_notifications_object (`object_type`, `object_id`), PRIMARY KEY(`notification_id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB':

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_notifications' already exists
federation: An exception occurred while executing 'CREATE TABLE `oc_trusted_servers` (`id` INT AUTO_INCREMENT NOT NULL, `url` VARCHAR(512) NOT NULL COMMENT 'Url of trusted server', `url_hash` VARCHAR(255) DEFAULT '' NOT NULL COMMENT 'sha1 hash of the url without the protocol', `token` VARCHAR(128) DEFAULT NULL COMMENT 'token used to exchange the shared secret', `shared_secret` VARCHAR(256) DEFAULT NULL COMMENT 'shared secret used to authenticate', `status` INT DEFAULT 2 NOT NULL COMMENT 'current status of the connection', `sync_token` VARCHAR(512) DEFAULT NULL COMMENT 'cardDav sync token', UNIQUE INDEX url_hash (`url_hash`), PRIMARY KEY(`id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB':

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_trusted_servers' already exists
files_trashbin: An exception occurred while executing 'CREATE TABLE `oc_files_trash` (`auto_id` INT AUTO_INCREMENT NOT NULL, `id` VARCHAR(250) DEFAULT '' NOT NULL, `user` VARCHAR(64) DEFAULT '' NOT NULL, `timestamp` VARCHAR(12) DEFAULT '' NOT NULL, `location` VARCHAR(512) DEFAULT '' NOT NULL, `type` VARCHAR(4) DEFAULT NULL, `mime` VARCHAR(255) DEFAULT NULL, INDEX id_index (`id`), INDEX timestamp_index (`timestamp`), INDEX user_index (`user`), PRIMARY KEY(`auto_id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB':

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_files_trash' already exists
dav: An exception occurred while executing 'CREATE TABLE `oc_addressbooks` (`id` BIGINT UNSIGNED AUTO_INCREMENT NOT NULL, `principaluri` VARCHAR(255) DEFAULT NULL, `displayname` VARCHAR(255) DEFAULT NULL, `uri` VARCHAR(255) DEFAULT NULL, `description` VARCHAR(255) DEFAULT NULL, `synctoken` INT UNSIGNED DEFAULT 1 NOT NULL, UNIQUE INDEX addressbook_index (`principaluri`, `uri`), PRIMARY KEY(`id`)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB':

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_addressbooks' already exists
Starting code integrity check...
Finished code integrity check
Update successful
Turned off maintenance mode
Reset log level
bash-4.2$

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions