[Obm] [OBM][update-debian] : petit problème concernant mysql

Lilian CHAMONTIN lchamontin at linagora.com
Tue Apr 26 11:35:40 CEST 2011


Bonjour Pascal

Merci pour ce retour et pour le patch !


Cordialement,

Lilian Chamontin, OBM




Le 24/04/2011 12:00, Pascal salaun a écrit :
> Bonjour,
>
> je viens de migrer vers le 2.3.19,,et viens de rencontrer une petite erreur lors de la maj des tables MySQL :
>
> [error]
> dbconfig-common: writing config to /etc/dbconfig-common/obm-storage.conf
> *** WARNING: ucf was run from a maintainer script that uses debconf, but
>                the script did not pass --debconf-ok to ucf. The maintainer
>                script should be fixed to not stop debconf before calling ucf,
>                and pass it this parameter. For now, ucf will revert to using
>                old-style, non-debconf prompting. Ugh!
>
>                Please inform the package maintainer about this problem.
> creating database backup in /var/cache/dbconfig-common/backups/obm-storage_2.3.18-1.mysql.
> applying upgrade sql for 2.3.18-1 ->  2.3.19-1.
> error encountered processing /usr/share/dbconfig-common/data/obm-storage/upgrade/mysql/2.3.19-1:
> mysql said: ERROR 1060 (42S21) at line 4: Duplicate column name 'timestamp'
> [/error]
>
>
> le contenu du fichier en question est :
>
> [code]
> UPDATE ObmInfo SET obminfo_value = '2.3.19-pre' WHERE obminfo_name = 'db_version';
>
> DELETE FROM `opush_sync_mail`;
> ALTER TABLE `opush_sync_mail` ADD COLUMN `timestamp` timestamp NOT NULL;
>
> DROP TABLE IF EXISTS `opush_sync_deleted_mail`;
> CREATE TABLE opush_sync_deleted_mail (
>           `collection_id`   INTEGER NOT NULL,
>           `device_id`       INTEGER NOT NULL,
>           `mail_uid`        INTEGER NOT NULL,
>       `timestamp`        timestamp NOT NULL,
>           KEY `opush_sync_deletedmail_collection_id_folder_mapping_id_fkey` (`collection_id`),
>           KEY `opush_sync_deletedmail_device_id_device_id_fkey` (`device_id`),
>           CONSTRAINT `opush_sync_deletedmail_collection_id_folder_mapping_id_fkey` FOREIGN KEY (`collection_id`) REFERENCES `opush_folder_mapping` (`id`) ON DELETE CASCADE,
>           CONSTRAINT `opush_sync_deletedmail_device_id_device_id_fkey` FOREIGN KEY (`device_id`) REFERENCES `opush_device` (`id`) ON DELETE CASCADE
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
> -- possibility to save an organizer which is not the same as the owner into an event template :
> ALTER TABLE `EventTemplate` ADD COLUMN `eventtemplate_organizer` int(11) default 0 AFTER eventtemplate_group_ids;
>
> -- add sequence field to table event
> ALTER TABLE `Event` ADD COLUMN `event_sequence` int(8) default '0';
>
>
> UPDATE ObmInfo SET obminfo_value = '2.3.19' WHERE obminfo_name = 'db_version';
> [code]
>
>
> Après un petit check de ce qui avait appliqué, j'ai modifié le code pour ceci :
>
> [code]
> UPDATE ObmInfo SET obminfo_value = '2.3.19-pre' WHERE obminfo_name = 'db_version';
>
> DELETE FROM `opush_sync_mail`;
>
> DROP TABLE IF EXISTS `opush_sync_deleted_mail`;
> CREATE TABLE opush_sync_deleted_mail (
>           `collection_id`   INTEGER NOT NULL,
>           `device_id`       INTEGER NOT NULL,
>           `mail_uid`        INTEGER NOT NULL,
>       `timestamp`        timestamp NOT NULL,
>           KEY `opush_sync_deletedmail_collection_id_folder_mapping_id_fkey` (`collection_id`),
>           KEY `opush_sync_deletedmail_device_id_device_id_fkey` (`device_id`),
>           CONSTRAINT `opush_sync_deletedmail_collection_id_folder_mapping_id_fkey` FOREIGN KEY (`collection_id`) REFERENCES `opush_folder_mapping` (`id`) ON DELETE CASCADE,
>           CONSTRAINT `opush_sync_deletedmail_device_id_device_id_fkey` FOREIGN KEY (`device_id`) REFERENCES `opush_device` (`id`) ON DELETE CASCADE
> ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
>
> -- possibility to save an organizer which is not the same as the owner into an event template :
>
> -- add sequence field to table event
>
>
> UPDATE ObmInfo SET obminfo_value = '2.3.19' WHERE obminfo_name = 'db_version';
>
> [/code]
>
>
> Je l'ai en fait épurer de toutes modifs(structure) de table et ai refait un upgrade
>
>
> Bon week-end à toutes et tous
>
> Pascal
>
>
> _______________________________________________
> Obm mailing list
> Obm at list.obm.org
> http://list.obm.org/mailman/listinfo/obm
>    




More information about the Obm mailing list