Roundcube Community Forum

Miscellaneous => Roundcube Discussion => Topic started by: maciu on March 17, 2022, 02:42:53 PM

Title: trouble running database schema upgrade script on very old version of roundcube
Post by: maciu on March 17, 2022, 02:42:53 PM
I have been running roundcube for the past 10+ years and upgrading it regularly. About a year ago the database schema upgrade started failing for me with the following error:

Code: [Select]
Updating database schema (2020020101)... [FAILED]
ERROR: Error in DDL upgrade 2020020101: [1091] Can't DROP 'user_id_fk_cache_index'; check that column/key exists
All done.

FYI I am running mysql server 8.0.

Can anyone here advise how to get around it?
Title: Re: trouble running database schema upgrade script on very old version of roundcube
Post by: JohnDoh on March 18, 2022, 05:12:32 AM
It looks like you might have missed a schema update in the past. The discussion here might help you https://github.com/roundcube/roundcubemail/issues/8386 basically you need to get your schema into a valid state before the update can work.
Title: Re: trouble running database schema upgrade script on very old version of roundcube
Post by: maciu on March 31, 2022, 10:53:56 PM
Took me a while to get back to this, yes, your pointer was spot on, thanks for providing the link.

I am a little further now - I had to convert all my tables to InnoDB (yes some were using MYISAM!). The current error seems harder to overcome for me:

Updating database schema (2020020101)... [FAILED]
ERROR: Error in DDL upgrade 2020020101: [3886] Could not change column 'mailbox' of table 'cache_index'. The resulting size of index 'PRIMARY' would exceed the max key length of 1000 bytes.

Any chance you can advise?
Title: Re: trouble running database schema upgrade script on very old version of roundcube
Post by: JohnDoh on April 01, 2022, 02:02:48 PM
https://github.com/roundcube/roundcubemail/blob/master/UPGRADING#L26

might help
Title: Re: trouble running database schema upgrade script on very old version of roundcube
Post by: maciu on April 06, 2022, 07:18:57 AM
Thanks for the tips John! Running on 1.5.2 successfully now!