Problems with oc_authtoken updating to NC28

Support intro

Sorry to hear you’re facing problems :slightly_frowning_face:

help.nextcloud.com is for home/non-enterprise users. If you’re running a business, paid support can be accessed via portal.nextcloud.com where we can ensure your business keeps running smoothly.

In order to help you as quickly as possible, before clicking Create Topic please provide as much of the below as you can. Feel free to use a pastebin service for logs, otherwise either indent short log examples with four spaces:

example

Or for longer, use three backticks above and below the code snippet:

longer
example
here

Some or all of the below information will be requested if it isn’t supplied; for fastest response please provide as much as you can :heart:

Nextcloud version (eg, 20.0.5): 27.1.5
Operating system and version (eg, Ubuntu 20.04): Synology 7.2
Apache or nginx version (eg, Apache 2.4.25): apache
PHP version (eg, 7.4): PHP 8.0
The issue you are facing:

Is this the first time you’ve seen this error? (Y/N): Y

Steps to replicate it:

  1. while updating with the command ./occ update

The output of your Nextcloud log in Admin > Logging:
Updating database schema
Exception: Database error when running migration 28000Date20230906104802 for app core
Index name “authtoken_uid_index” for table “oc_authtoken_bck” collides with the constraint on table “oc_authtoken”.
Update failed

The output of your config.php file in /path/to/nextcloud (make sure you remove any identifiable information!):

Did you fidle around with your tables and once created a backup of your “oc_authtoken” table?
The table “oc_authtoken_bck” does normaly not exist, only if you created it once for an administration task.

You can solve that with:

  1. Create a database dump

  2. Open your sql console and drop the backup table:

    DROP TABLE nextcloud.oc_authtoken_bck;
    
  3. Restart update

I hope that solves your issue!
Much luck,
ernolf

Thank you. I dropped the index and I could finish the update successfully. I will follow your suggestion and drop the table, that I probably create many years ago

This topic was automatically closed 8 days after the last reply. New replies are no longer allowed.