[imp] "Integrity constraint violation" when moving emails

Michael M Slusarz slusarz at horde.org
Fri Mar 14 17:23:23 UTC 2014


Quoting "Jens-U. Mozdzen" <jmozdzen at nde.ag>:

> Hi Arjen,
>
> Zitat von Arjen de Korte <arjen+horde at de-korte.org>
>>> Citeren "Jens-U. Mozdzen" <jmozdzen at nde.ag>:
>> [....]
>>> Might it be that not handling of new horde_imap_client_data entries
>>> is the root cause, but those 13 entries above? How would I proceed
>>> to clean up the entries (with messageid==0) in
>>> horde_imap_client_message without disturbing data integrity?
>>
>> I saw this too a couple of days ago. Since these tables contain only
>> cached information from the IMAP server, I just DROPped the tables and
>> created new ones. After that, the error message was gone.
>
> I have dropped all horde_imap_client tables and ran  
> "horde-db-migrate", which created the tables (and set messageid to  
> autoincrement: "-- createTable('horde_imap_client_data',  
> array('autoincrementKey' => 'messageid'))").
>
> Now none of the test cases produce an error. Looks to me as if I  
> either missed some earlier migration step or some migration step  
> missed setting the autoincrement.
>
> Thank you for your response, it was very helpful!

IIRC, there were some issues in the migration script a few weeks ago  
that have since been fixed, so that's probably what happened here.

michael

___________________________________
Michael Slusarz [slusarz at horde.org]



More information about the imp mailing list