Author Topic: trouble running database schema upgrade script on very old version of roundcube  (Read 900 times)

Offline maciu

  • Newbie
  • *
  • Posts: 3
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?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,733
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.
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline maciu

  • Newbie
  • *
  • Posts: 3
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?

Offline JohnDoh

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 2,733
Roundcube Plugins: Contextmenu, SpamAssassin Prefs, and more…

Offline maciu

  • Newbie
  • *
  • Posts: 3
Thanks for the tips John! Running on 1.5.2 successfully now!