Roundcube 1.5 upgrade fails with db scheme update

Bramus

Verified User
Joined
Jun 19, 2008
Messages
22
Location
The Netherlands
While trying to upgrade Roundcube to the latest version i'm getting an error when updating the Roundcube db. See below. Did run the update on another server also, with almost the same config (same OS and same DirectAdmin/MariaDB/PHP versions) and this one went well. See below for the error:

Roundcube 1.5.0 has been installed successfully.
WARNING: Changed defaults (These config options have new default values):
- 'skin'
- 'smtp_port'
- 'smtp_user'
- 'smtp_pass'
- 'jquery_ui_skin_map'
Executing database schema update.
Updating database schema (2020020101)... [FAILED]
ERROR: Error in DDL upgrade 2020020101: [1091] Can't DROP FOREIGN KEY `user_id_fk_cache`; check that it exists
 
I had a similar problem, and ended up commenting out the related line in SQL/mysql/2020020101.sql and re-running the updatedb.sh script manually (see bottom of UPGRADING for more info on this) until it managed to finish with the db upgrade process. Some of the lines in the database upgrade scripts assume a certain state in the database, and when that's not the case, it stops on errors such as this. This also means that you might need to comment out more lines than just the one giving you the error above, as the db upgrade script/schema isn't really designed to be run more than once.
 
Thanks @kristian! I did run the updatedb.sh and got noticed there were some more errors. After solving those in the sql update script i was able to upgrade the DB and everything works as expected now. Also all the users got updated, seems to be fine now.
 
Back
Top