Roundcube Community Forum

Release Support => Pending Issues => Topic started by: sauj on June 18, 2022, 01:13:35 PM

Title: Schema Update Issue - 1.4.13 to 1.5.2
Post by: sauj on June 18, 2022, 01:13:35 PM
Hello,

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?
Title: Re: Schema Update Issue - 1.4.13 to 1.5.2
Post by: JohnDoh 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