Roundcube Community Forum

 

Upgrading 1.4.12 to 1.5.1 DB upgrade for mysql fails

Started by cdieni, December 03, 2021, 06:44:10 PM

Previous topic - Next topic

cdieni

Never had issues upgrading roundcube, until now:

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 am not impressed...

cdieni

The upgrade file 2020020101.sql has has these commands:

ALTER TABLE `cache` DROP FOREIGN KEY `user_id_fk_cache`;
ALTER TABLE `cache_index` DROP FOREIGN KEY `user_id_fk_cache_index`;
ALTER TABLE `cache_thread` DROP FOREIGN KEY `user_id_fk_cache_thread`;
ALTER TABLE `cache_messages` DROP FOREIGN KEY `user_id_fk_cache_messages`
ALTER TABLE `contactgroups` DROP FOREIGN KEY `user_id_fk_contactgroups`;
ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`;
ALTER TABLE `dictionary` DROP FOREIGN KEY `user_id_fk_dictionary`;
ALTER TABLE `filestore` DROP FOREIGN KEY `user_id_fk_filestore`;
ALTER TABLE `identities` DROP FOREIGN KEY `user_id_fk_identities`;
ALTER TABLE `searches` DROP FOREIGN KEY `user_id_fk_searches`;

It cannot drop the foreign key because it is not there on 1.4.12.

This script is wrong or relates maybe to 1.5.0 which is no longer online to download...

JohnDoh

The user_id_fk_cache key has been part of the Roundcube database for more then 10 years see https://github.com/roundcube/roundcubemail/commit/94fe9ca1a87b20ddeee55024986e95ca72097af6 may be you had some problem in the past with a db update or something.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more...