Does anyone have any input on this? If I can't get the SQL upgrade lines working, is there at least some way to export/import data to a newer version of the database?
I'm really stuck in a bind here. Thanks!
- John
On 12/8/10 9:10 AM, John May wrote:
I'm trying to upgrade our 0.3.1 installation to 0.4.2.
When I execute the following SQL upgrade lines, I get the errors that follow them:
mysql> ALTER TABLE
contacts
ADD CONSTRAINTuser_id_fk_contacts
FOREIGN KEY (user_id
) -> REFERENCESusers
(user_id
) ON DELETE CASCADE ON UPDATE CASCADE; ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (pis_roundcube/#sql-36e8_638
, CONSTRAINTuser_id_fk_contacts
FOREIGN KEY (user_id
) REFERENCESusers
(user_id
) ON DELETE CASCADE ON UPDATE CASCADE)mysql> ALTER TABLE
identities
ADD CONSTRAINTuser_id_fk_identities
FOREIGN KEY (user_id
) -> REFERENCESusers
(user_id
) ON DELETE CASCADE ON UPDATE CASCADE; ERROR 1452 (23000): Cannot add or update a child row: a foreign key constraint fails (pis_roundcube/#sql-36e8_638
, CONSTRAINTuser_id_fk_identities
FOREIGN KEY (user_id
) REFERENCESusers
(user_id
) ON DELETE CASCADE ON UPDATE CASCADE)The first 2 ALTER TABLE commands work OK, and I've verified all tables have been changed to InnoDB. Any ideas on how to get this to work?
Alternately, is there a good way to import data from an existing older roundcube MySQL database into a fresh, up-to-date one?
Thanks!
- John
List info: http://lists.roundcube.net/users/ BT/9b404e9e