Thank you Paul, I fixed these last errors and now it looks like I have a
good script to do the migration.
  Dirce

> On 02/10/2012 08:35 PM, drsyst...@globalcerts.net wrote:
>> mysql>show innodb status;
>> ....
>> 120210 14:15:46 Error in foreign key constraint of table
>> dbmail/#sql-5c9_3ed:
>>
>>         FOREIGN KEY (`user_idnr`) REFERENCES `dbmail_users`
>> (`user_idnr`)
>> ON DELETE CASCADE ON UPDATE CASCADE:
>> Cannot find an index in the referenced table where the
>> referenced columns appear as the first columns, or column types
>> in the table and the referenced table do not match for constraint. Note
>> that the internal storage type of ENUM and SET changed in
>> tables created with >= InnoDB-4.1.12, and such columns in old tables
>> cannot be referenced by such columns in new tables.
>
>
> So apparently there is a type mismatch between
> dbmail_auto_replies.user_idnr and dbmail_users.user_idnr.
>
>> I also should put here the exact versions from where I am migrating:
>>  >yum provides dbmail
>> dbmail-2.2.9-1.fc8.i386 : The DBMail mail storage system
>> dbmail-2.2.5-7.fc8.i386 : The DBMail mail storage system
>
> Both are really old. But ok, it should still work.
>
>
>> ---SMG -- these were missing
>> alter table dbmail_auto_notifications MODIFY COLUMN user_idnr
>> bigint(20)
>> UNSIGNED DEFAULT 0 NOT NULL;
>> alter table dbmail_auto_notifications  MODIFY COLUMN notify_address
>> varchar(255) NOT NULL;
>> alter table dbmail_auto_replies  MODIFY COLUMN user_idnr BIGINT(20)
>> DEFAULT 0 NOT NULL;
>
> missing UNSIGNED
>
>> alter table dbmail_messageblks MODIFY COLUMN messageblk_idnr bigint(20)
>> unsigned NOT NULL auto_increment;
>> alter table dbmail_messageblks MODIFY COLUMN physmessage_id bigint(20)
>> DEFAULT 0 NOT NULL;
>
> missing UNSIGNED
>
>> alter table dbmail_messageblks  MODIFY COLUMN blocksize  bigint(20)
>> DEFAULT 0
>>  NOT NULL;
>
> You forgot to make some of these UNSIGNED.
>
>
> Please use attachments to share code like schema dumps. Don't paste.
>
okay, makes sense

>
> --
> ________________________________________________________________
> Paul J Stevens        pjstevns @ gmail, twitter, skype, linkedin
>
>   * Premium Hosting Services and Web Application Consultancy *
>
>            www.nfg.nl/i...@nfg.nl/+31.85.877.99.97
> ________________________________________________________________
> _______________________________________________
> DBmail mailing list
> DBmail@dbmail.org
> http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail
>


_______________________________________________
DBmail mailing list
DBmail@dbmail.org
http://mailman.fastxs.nl/cgi-bin/mailman/listinfo/dbmail

Reply via email to