Re: Installations problems with dbmail 3.2.3

Ralph Ballier <[email protected]> Thu, 12 Oct 2017 11:33:03 +0200
Newsgroups gmane.mail.imap.dbmail
Message-ID <20171012113303.Horde.uKG7RYhZXqxhssW8svUsGkm@horde.osz-lise-meitner.eu>
  ----- Nachricht von Sandino Araico Sánchez <[email protected]> ---------
     Datum: Thu, 12 Oct 2017 04:00:17 -0500
       Von: Sandino Araico Sánchez <[email protected]>
Antwort an: DBMail mailinglist <[email protected]>
   Betreff: Re: [Dbmail] Installations problems with dbmail 3.2.3
        An: DBMail mailinglist <[email protected]>, Ralph Ballier  
<[email protected]>

[..............]

  >> Thanks for your answer.

>> I now use 3.1.17. There is the same error message while set up the  
>> tables using "create_tables.mysql":

>> ERROR 1005 (HY000) at line 401: Can't create table  
>> `dbmail`.`dbmail_auto_replies` (errno: 121 "Duplicate key on write  
>> or update")
>> MySQL error 1005 is an incorrect foreign key. In this case a  
>> duplicate key in dbmail_users.user_idnr.

> You must fix all duplicate keys in dbmail_users (there might be more  
> than one) before table dbmail_auto_replies  can be created .

Yes, you are right. I find two identical lines in "CREATE TABLE  
dbmail_auto_notifications" and in "CREATE TABLE dbmail_auto_replies"  
(see below).

But what do you mean with "fix it"? Shall I delete the words FOREIGN  
KEY? If yes, in the first or in the second CREATE statement? Or in both?

Thanks

Ralph

  CREATE TABLE dbmail_auto_notifications (
          user_idnr bigint(20) UNSIGNED NOT NULL,
          notify_address varchar(100) NOT NULL default '',
          INDEX user_idnr_index (user_idnr),
          FOREIGN KEY USER_IDNR_FK (USER_IDNR)
                  REFERENCES dbmail_users (user_idnr) ON DELETE  
CASCADE ON UPDATE CASCADE
  ) ENGINE InnoDB DEFAULT CHARSET=utf8;
   
  DROP TABLE IF EXISTS dbmail_auto_replies;
  CREATE TABLE dbmail_auto_replies (
          user_idnr bigint(20) UNSIGNED DEFAULT '0' NOT NULL,
          start_date DATETIME NOT NULL,
          stop_date DATETIME NOT NULL,
          reply_body MEDIUMTEXT,
          INDEX user_idnr_index (user_idnr),
          FOREIGN KEY USER_IDNR_FK (USER_IDNR)
                  REFERENCES dbmail_users (user_idnr) ON DELETE  
CASCADE ON UPDATE CASCADE
  ) ENGINE InnoDB DEFAULT CHARSET=utf8;
   

>  
>    

_______________________________________________
DBmail mailing list
[email protected]
http://lists.nfg.nl/mailman/listinfo/dbmail