# [Mail Server] Actualizacion de RoundCubeMail (Cerrado)

## JotaCE

Estimados :

Acabo de aplicar una actualizacion de RoundCubeMail 0.3.1 a 0.4.2 

Me logeo bien y todo anda bien pero se me presento un problema cuando le doy click al boton contactos. me muestra el siguiente mensaje de error.

```
SERVICE CURRENTLY NOT AVAILABLE!

Error No. [500]
```

el archivo de log me acusa lo siguiente :

```
[26-Dec-2010 21:51:14 -0600]: DB Error: _doQuery: [Error message: Could not execute statement]

[Last executed query: PREPARE mdb2_statement_mysql_371da1bab22a5a485334153a251c12829627e494a FROM 'SELECT * FROM contactgroups WHERE del<>1 AND user_id=? ORDER BY name']

[Native code: 1146]

[Native message: Table 'roundcubemail.contactgroups' doesn't exist]

 in /var/www/localhost/htdocs/roundcube/program/include/rcube_mdb2.php on line 264 (GET /roundcube/?_task=addressbook)
```

Alguna idea de como resolver eso ?

De antemano muchas gracias!!!

----------

## opotonil

Tiene toda la pinta de haber cambiado la BD en la actualización ¿lo has comprobado?

http://trac.roundcube.net/wiki/Howto_Upgrade

 *Quote:*   

> 
> 
> Database Setup
> 
> While you're uploading (or after you're done) you have one final step to do before you can start using your new version of RoundCube. You need to check to see if any database changes are needed. Look in the SQL directory in RoundCube, and find a file that is named: "*.update.sql" where * is your database backend type (MySQL, MySQL 5, PostgreSQL, SQLite). You only need to execute the commands listed that happened after the version you had previously installed (i.e. anything listed as "Updates from 0.1-beta2").
> ...

 

Salu2.

----------

## JotaCE

 *opotonil wrote:*   

> Tiene toda la pinta de haber cambiado la BD en la actualización ¿lo has comprobado?
> 
> http://trac.roundcube.net/wiki/Howto_Upgrade
> 
>  *Quote:*   
> ...

 

Asi me parece a mi tambien..... tambien habia notado la existancia de esos scripts.

Llegando a mi maquina lo voy a aplicar y les comento!

```
-- Updates from version 0.3.1

-- WARNING: Make sure that all tables are using InnoDB engine!!!

--          If not, use: ALTER TABLE xxx ENGINE=InnoDB;

/* MySQL bug workaround: http://bugs.mysql.com/bug.php?id=46293 */

/*!40014 SET FOREIGN_KEY_CHECKS=0 */;

ALTER TABLE `messages` DROP FOREIGN KEY `user_id_fk_messages`;

ALTER TABLE `cache` DROP FOREIGN KEY `user_id_fk_cache`;

ALTER TABLE `contacts` DROP FOREIGN KEY `user_id_fk_contacts`;

ALTER TABLE `identities` DROP FOREIGN KEY `user_id_fk_identities`;

ALTER TABLE `messages` ADD CONSTRAINT `user_id_fk_messages` FOREIGN KEY (`user_id`)

 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `cache` ADD CONSTRAINT `user_id_fk_cache` FOREIGN KEY (`user_id`)

 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `contacts` ADD CONSTRAINT `user_id_fk_contacts` FOREIGN KEY (`user_id`)

 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `identities` ADD CONSTRAINT `user_id_fk_identities` FOREIGN KEY (`user_id`)

 REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE;

ALTER TABLE `contacts` ALTER `name` SET DEFAULT '';

ALTER TABLE `contacts` ALTER `firstname` SET DEFAULT '';

ALTER TABLE `contacts` ALTER `surname` SET DEFAULT '';

ALTER TABLE `identities` ADD INDEX `user_identities_index` (`user_id`, `del`);

ALTER TABLE `identities` ADD `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00' AFTER `user_id`;

CREATE TABLE `contactgroups` (

  `contactgroup_id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT,

  `user_id` int(10) UNSIGNED NOT NULL DEFAULT '0',

  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',

  `del` tinyint(1) NOT NULL DEFAULT '0',

  `name` varchar(128) NOT NULL DEFAULT '',

  PRIMARY KEY(`contactgroup_id`),

  CONSTRAINT `user_id_fk_contactgroups` FOREIGN KEY (`user_id`)

    REFERENCES `users`(`user_id`) ON DELETE CASCADE ON UPDATE CASCADE,

  INDEX `contactgroups_user_index` (`user_id`,`del`)

) /*!40000 ENGINE=INNODB */ /*!40101 CHARACTER SET utf8 COLLATE utf8_general_ci */;

CREATE TABLE `contactgroupmembers` (

  `contactgroup_id` int(10) UNSIGNED NOT NULL,

  `contact_id` int(10) UNSIGNED NOT NULL DEFAULT '0',

  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',

  PRIMARY KEY (`contactgroup_id`, `contact_id`),

  CONSTRAINT `contactgroup_id_fk_contactgroups` FOREIGN KEY (`contactgroup_id`)

    REFERENCES `contactgroups`(`contactgroup_id`) ON DELETE CASCADE ON UPDATE CASCADE,

  CONSTRAINT `contact_id_fk_contacts` FOREIGN KEY (`contact_id`)

    REFERENCES `contacts`(`contact_id`) ON DELETE CASCADE ON UPDATE CASCADE

) /*!40000 ENGINE=INNODB */;

/*!40014 SET FOREIGN_KEY_CHECKS=1 */;
```

----------

