ownCloud 8.2.9 Upgrade to 9.0.8 Error

contacts_old: An exception occurred while executing 'CREATE TABLE oc_contacts_addressbooks (id INT UNSIGNED AUTO_INCREMENT NOT NULL, userid VARCHAR(255) DEFAULT '' NOT NULL, displayname VARCHAR(255) DEFAULT NULL, uri VARCHAR(200) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, ctag INT UNSIGNED DEFAULT 1 NOT NULL, active INT DEFAULT 1 NOT NULL, INDEX c_addressbook_userid_index (userid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB': SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_contacts_addressbooks' already exists

You have already reported that to the bugtracker at [1] (which is btw. a duplicate of [2]) so please keep this issue at one place.

[1]

[2]

Update:
I run the following command from command
sudo -u www-data ./occ 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
Checked database schema update for apps
Updating database schema
Updated database
contacts_old: An exception occurred while executing 'CREATE TABLE oc_contacts_addressbooks (id INT UNSIGNED AUTO_INCREMENT NOT NULL, userid VARCHAR(255) DEFAULT '' NOT NULL, displayname VARCHAR(255) DEFAULT NULL, uri VARCHAR(200) DEFAULT NULL, description VARCHAR(255) DEFAULT NULL, ctag INT UNSIGNED DEFAULT 1 NOT NULL, active INT DEFAULT 1 NOT NULL, INDEX c_addressbook_userid_index (userid), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB':

SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'oc_contacts_addressbooks' already exists
calendar_old: An exception occurred while executing 'CREATE TABLE oc_clndr_objects (id INT UNSIGNED AUTO_INCREMENT NOT NULL, calendarid INT UNSIGNED DEFAULT 0 NOT NULL, objecttype VARCHAR(40) DEFAULT '' NOT NULL, startdate DATETIME DEFAULT '1970-01-01 00:00:00', enddate DATETIME DEFAULT '1970-01-01 00:00:00', repeating INT DEFAULT 0, summary VARCHAR(255) DEFAULT NULL, calendardata LONGTEXT DEFAULT NULL, uri VARCHAR(255) DEFAULT NULL, lastmodified INT DEFAULT 0, PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8 COLLATE utf8_bin ENGINE = InnoDB':

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

My owncloud came back ... but this time i have another error.
"there were problems with the code integrity check , more information

Results

  • core
    • EXTRA_FILE
      • owncloud-8.1.1.tar.bz2
      • indie.json
      • stats/hourly_usage_201703.png
      • stats/ctry_usage_201609.png
      • stats/usage_201509.html
      • stats/usage_201507.html
      • stats/hourly_usage_201606.png
      • stats/daily_usage_201610.png
      • stats/webalizer.current
      • stats/hourly_usage_201701.png
      • stats/ctry_usage_201612.png
        Raw output
        ==========
        Array
        (
        [core] => Array
        (
        [EXTRA_FILE] => Array
        (
        [owncloud-8.1.1.tar.bz2] => Array
        (
        [expected] =>
        [current] => 7d975e3352529a50c362b31445f36cc75ad7999618011320518b04e3a3853fcefac39dd53a6c9880bf6e073c46f06203d12f1ca9c0cb4c816fa784c11620c0a7
        )
                [indie.json] => Array
                    (
                        [expected] => 
                        [current] => 09c52e4fec07e803f9cbd5526da5b378f98a70fb6a28bd7c6a6b1a654afae6e06a98756aca485da1be2f2adada58b6c52258ddb621386385e7926b54989d1799
                    )

The one thing i did is i got the backup before doing the upgrade and replace does files.
is there a way to fix this.. i check the documentation but unable to fix.

Guys never mind this has being solved.
for some reason i copied does files by mistake i deleted them
and message when away now everything is good

SOLVED

Solution:
I run the following command from command
sudo -u www-data ./occ upgrade

From command prompt

@rasco If this is solved for you please close your reported issue at github.