Author Topic: Schema Update Issue - 1.4.13 to 1.5.2  (Read 233 times)

Offline sauj

  • Newbie
  • *
  • Posts: 1
Schema Update Issue - 1.4.13 to 1.5.2
« on: June 18, 2022, 01:13:35 PM »

Updated Roundcube from 1.4.13 to 1.5.2 and got two errors:

Code: [Select]
ERROR: Error in DDL upgrade 2020020101: [1062] Duplicate entry 'example-localhost' for key 'username'
and then found that the schema update failed

Code: [Select]
Updating database schema (2020020101)... [FAILED]
-- is this a show stopper? any suggestions on how to resolve this?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,718
Re: Schema Update Issue - 1.4.13 to 1.5.2
« Reply #1 on: June 19, 2022, 02:26:02 AM »
The MySQL schema has had a unique index on the fields the combination of the fields `username` and `mail_host` for a long time. That error suggests that the constraint is missing in your current db and you have a duplicate entry for username = example and mail_host = localhost. You need to correct that manually and make sure you have a correct db schema for your current version before try to update.

You can use a command like `SHOW CREATE TABLE `users`;` to output your current schema and then you can compare that with the mysql.initial file
« Last Edit: June 19, 2022, 02:43:07 AM by JohnDoh »
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and moreā€¦