Hi all,
I get an error when I use mysql.upgrade.sql in order to upgrade from 0.2.2 to latest stable.
When I type:
ALTER TABLE `messages` DROP FOREIGN KEY `user_id_fk_messages` ;
I get:
Quote#1025 - Error on rename of './roundcube2/messages' to './roundcube2/#sql2-2e00-aed' (errno: 152)
I've read the link (MySQL Bugs: #46293: Conditional comments not working in FOREIGN KEY definition (http://bugs.mysql.com/bug.php?id=46293)) but I'm not so confident with mysql.. any suggestion?
Thank you!
Not sure if this is still of use to anyone, but I discovered how to fix this problem with help from the information at MySQL Lists: mysql: Re: Deleting Foreign Key (http://lists.mysql.com/mysql/204218). It's a bug in the upgrade script, the field that's being dropped is just a KEY, not a FOREIGN KEY. For the lines that are causing problems, replace "DROP FOREIGN KEY" with "DROP KEY" and it should work.
I've added a comment about it to the bug report at #1486794 (Unable to add contact groups when using upgraded DB) ? Roundcube Webmail (http://trac.roundcube.net/ticket/1486794#comment:8), which looks related. I'm not sure if the problem is caused by not changing the table engines to InnoDB prior to upgrading to Roundcube 0.3 or whether it is a genuine bug in the MySQL upgrade script.