Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OC Upgrade from 8.2.2 - 9.0.0 Doctrine\DBAL\Exception\TableExistsException #23122

Closed
Farfetch42 opened this issue Mar 10, 2016 · 5 comments
Closed

Comments

@Farfetch42
Copy link

Steps to reproduce

  1. Manual upgrade of owncloud from 8.2.2 - 9.0.0
  2. errors after running $ sudo -u www-data php occ upgrade
  3. Displays this:

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_trusted_servers" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "url" VARCHAR(512) NOT NULL, "url_hash" VARCHAR(255) DEFAULT '' NOT NULL, "token" VARCHAR(128) DEFAULT NULL, "shared_secret" VARCHAR(256) DEFAULT NULL, "status" INTEGER DEFAULT 2 NOT NULL, "sync_token" VARCHAR(512) DEFAULT NULL)':

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

Expected behaviour

Upgrade successful

Actual behaviour

Doctrine\DBAL\Exception\TableExistsException: An exception occurred while executing 'CREATE TABLE "oc_trusted_servers" ("id" INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, "url" VARCHAR(512) NOT NULL, "url_hash" VARCHAR(255) DEFAULT '' NOT NULL, "token" VARCHAR(128) DEFAULT NULL, "shared_secret" VARCHAR(256) DEFAULT NULL, "status" INTEGER DEFAULT 2 NOT NULL, "sync_token" VARCHAR(512) DEFAULT NULL)':

SQLSTATE[HY000]: General error: 1 table "oc_trusted_servers" already exists
Update failed

Server configuration

Operating system:
Ubuntu 14.04
Web server:
Apache 2.4.7
Database:
mysql Ver 14.14 Distrib 5.5.47, for debian-linux-gnu (x86_64) using readline 6.3
PHP version:
PHP 5.5.9-1ubuntu4.14
ownCloud version: (see ownCloud admin page)
9.0.0
Updated from an older ownCloud or fresh install:
Updated from 8.2.2

Where did you install ownCloud from:
/etc/apt/sources.list.d/owncloud.list
deb http://download.owncloud.org/download/repositories/stable/Ubuntu_14.04/ /

Signing status (ownCloud 9.0 and above):

List of activated apps:

Enabled:

  • activity: 2.2.1
  • dav: true
  • federatedfilesharing: 0.1.0
  • files: 1.4.4
  • files_pdfviewer: 0.8
  • files_sharing: 0.9.1
  • files_texteditor: 2.1
  • files_trashbin: 0.8.0
  • files_versions: 1.2.0
  • firstrunwizard: 1.1
  • gallery: 14.5.0
  • notifications: 0.2.3
  • provisioning_api: 0.4.1
  • systemtags: 0.2
  • templateeditor: 0.1
    Disabled:
  • comments
  • encryption
  • external
  • federation
  • files_external
  • files_videoplayer
  • updatenotification
  • user_external
  • user_ldap

The content of config/config.php:

"system": {
    "instanceid": "oc0kwyx4osig",
    "passwordsalt": "***REMOVED SENSITIVE VALUE***",
    "secret": "***REMOVED SENSITIVE VALUE***",
    "trusted_domains": [
        "localhost",
        "192.168.1.71"
    ],
    "datadirectory": "\/var\/www\/owncloud\/data",
    "dbtype": "sqlite3",
    "version": "9.0.0.0",
    "logtimezone": "UTC",
    "installed": true,
    "memcache.local": "\\OC\\Memcache\\APCu",
    "mail_smtpmode": "smtp",
    "mail_smtpauth": 1,
    "loglevel": 0,
    "theme": "",
    "updatechecker": false,
    "maintenance": true
}

Are you using external storage, if yes which one: local/smb/sftp/...
No
Are you using encryption: yes/no
No
Are you using an external user-backend, if yes which one: LDAP/ActiveDirectory/Webdav/...
No

Any guidance would be most useful. Thanks.

@Farfetch42
Copy link
Author

I fixed this by dropping the table from owncloud.db and rerunning the upgrade.

@gjelsas
Copy link

gjelsas commented Mar 11, 2016

Hey there,

got the same issue, though I am no database expert. May I ask how you drop that table? I#m using sqlite btw...

Thanks!

@PVince81
Copy link
Contributor

Possibly related to or duplicate of #22993

@PVince81
Copy link
Contributor

For now I'll close as duplicate

@lock
Copy link

lock bot commented Aug 5, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Aug 5, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants