Author Topic: upgrade problem at MYSQL  (Read 6727 times)

Offline izzysanime

  • Newbie
  • *
  • Posts: 1
upgrade problem at MYSQL
« on: May 20, 2007, 05:34:01 PM »
Hi, I ran the code in the sql file for my DB, and this was the error i got

Error

SQL query:

-- RoundCube Webmail update script for MySQL databases
-- Updates from version 0.1-beta and 0.1-beta2
ALTER TABLE `messages` DROP `body` ,
DROP INDEX `cache_key` ,
ADD `structure` TEXT,
ADD UNIQUE `uniqueness` ( `user_id` , `cache_key` , `uid` ) ;

MySQL said: Documentation
#1062 - Duplicate entry '1-INBOX.Sent.msg-29' for key 2

THis was the code i ran, and I did remove the -- from it since Im using 5

-- RoundCube Webmail update script for MySQL databases
-- Updates from version 0.1-beta and 0.1-beta2

ALTER TABLE `messages`
 DROP `body`,
 DROP INDEX `cache_key`,
 ADD `structure` TEXT,
 ADD UNIQUE `uniqueness` (`user_id`, `cache_key`, `uid`);

ALTER TABLE `identities`
 ADD `html_signature` tinyint(1) default 0 NOT NULL;

-- Uncomment these lines if you're using MySQL 4.1 or higher
-- ALTER TABLE `users`
-- DEFAULT CHARACTER SET utf8 COLLATE utf8_general_ci,
-- CHANGE `username` `username` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL,
-- CHANGE `alias` `alias` VARCHAR( 128 ) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;

Offline extect

  • Newbie
  • *
  • Posts: 1
Re: upgrade problem at MYSQL
« Reply #1 on: May 26, 2007, 06:34:46 AM »
Same problem here. It looks like this line is causing it:

ADD UNIQUE `uniqueness` ( `user_id` , `cache_key` , `uid` ) ;

Offline rockwilda

  • Jr. Member
  • **
  • Posts: 35
Re: upgrade problem at MYSQL
« Reply #2 on: May 26, 2007, 07:47:21 AM »