* user warning: Can't create table './example/mail_mailserver_virtual_users.frm' (errno: 150) query: CREATE TABLE mail_mailserver_virtual_users ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, domain_id INT(11) NOT NULL, user VARCHAR(40) NOT NULL, password VARCHAR(32) NOT NULL, CONSTRAINT UNIQUE_EMAIL UNIQUE (domain_id, user), FOREIGN KEY (domain_id) REFERENCES mailserver_virtual_domains(id) ON DELETE CASCADE ) ENGINE = InnoDB /*!40100 DEFAULT CHARACTER SET utf8 */; in /var/www/vhosts/example.com/includes/database.mysql.inc on line 172.
* user warning: Can't create table './example/mail_mailserver_virtual_aliases.frm' (errno: 150) query: CREATE TABLE mail_mailserver_virtual_aliases ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, domain_id INT(11) NOT NULL, source VARCHAR(40) NOT NULL, destination VARCHAR(80) NOT NULL, FOREIGN KEY (domain_id) REFERENCES mailserver_virtual_domains(id) ON DELETE CASCADE ) ENGINE = InnoDB /*!40100 DEFAULT CHARACTER SET utf8 */; in /var/www/vhosts/example.com/includes/database.mysql.inc on line 172.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | mailserver.install.patch | 867 bytes | jmary |
Comments
Comment #1
jmary commentedThis is a mistake in the SQL request : The prefix mail_ which I set up at installing drupal is not considered in the reference of the foreign key.
It should be :
CREATE TABLE mail_mailserver_virtual_users ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, domain_id INT(11) NOT NULL, user VARCHAR(40) NOT NULL, password VARCHAR(32) NOT NULL, CONSTRAINT UNIQUE_EMAIL UNIQUE (domain_id, user), FOREIGN KEY (domain_id) REFERENCES mail_mailserver_virtual_domains(id) ON DELETE CASCADE ) ENGINE = InnoDB
and
CREATE TABLE mail_mailserver_virtual_aliases ( id INT(11) NOT NULL AUTO_INCREMENT PRIMARY KEY, domain_id INT(11) NOT NULL, source VARCHAR(40) NOT NULL, destination VARCHAR(80) NOT NULL, FOREIGN KEY (domain_id) REFERENCES mail_mailserver_virtual_domains(id) ON DELETE CASCADE ) ENGINE = InnoDB
Comment #2
jmary commentedThe answer above doesn't fix the issue :
The system then expect to find the tables without the prefix mail_ when adding a domain.
Comment #3
jmary commentedThis patch solves the problem of the non inserted prefix when referencing the table :
prefix_mailserver_virtual_domains
at creating the tables :
mail_mailserver_virtual_users and mail_mailserver_virtual_aliases.
========
This is solving one issue, we have another one then when we want to add a domain.