Roundcube Community Forum

 

Problem with upgrading

Started by desmond, October 02, 2010, 09:55:20 AM

Previous topic - Next topic

desmond

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) but I'm not so confident with mysql.. any suggestion?

Thank you!

Kitserve

#1
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. 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, 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.