Skip to content

Updating 5.0.8 -> 5.0.9 fails #4084

Closed
Closed

Description

@zakoon

Updating ownCloud to version 5.0.9, this may take a while.

Turned on maintenance mode
Failed to update database structure (MDB2 Error: unknown error, _doQuery: [Error message: Could not execute statement] [Last executed query: ALTER TABLE oc_locks CHANGE id id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY, CHANGE timeout timeout INT UNSIGNED DEFAULT 0, CHANGE created created BIGINT DEFAULT 0, CHANGE scope scope TINYINT DEFAULT 0, CHANGE depth depth TINYINT DEFAULT 0] [Native code: 1068] [Native message: Multiple primary key defined] )

Please reload the page.

The update was unsuccessful. Please report this issue to the ownCloud community.

MySQL-DB, OC 5.0.8

Activity

  1. enoch85 commented on Jul 16, 2013

    @enoch85

    Just wanted to say that it finally works for me without having to disable mainenance mode manually.

    apt-get update
    apt-get upgrade

    With no errors.

  2. tanatospl commented on Jul 23, 2013

    @tanatospl

    I had this problem too (Multiple primary key defined).

    The problem here is that mysql does not allow to alter primary key of a table without deleting that key first.
    I fixed this problem by going to phpmyadmin and manually deleting primary keys for tables like: locks, queuedtasks, vcategory, calendar* etc... and then refreshing my owncloud page. This restarted the update procedure and fixed the problem.

    The long term fix would be to change the owncloud updater code to always add "ALTER TABLE tablename DROP PRIMARY KEY" before executing any primary key altering on mysql.

  3. karlitschek commented on Nov 29, 2013

    @karlitschek
    Contributor

    is it possible that you manually migrated for sqlite to mysql?

  4. locked as resolved and limited conversation to collaborators on Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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