Author Topic: Problem with upgrading  (Read 2580 times)

Offline desmond

  • Newbie
  • *
  • Posts: 2
Problem with upgrading
« on: October 02, 2010, 09:55:20 AM »
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!

Offline Kitserve

  • Newbie
  • *
  • Posts: 1
    • http://www.kitserve.org.uk/
Problem with upgrading
« Reply #1 on: October 21, 2010, 03:52:51 PM »
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.
« Last Edit: October 22, 2010, 08:22:18 AM by Kitserve »