1005,"无法创建表格&test; app.addr_count' (错误:150)"

时间:2014-06-18 20:14:22

标签: mysql mysql-python

/ *创建表格邮寄* /

CREATE TABLE IF NOT EXISTS mailing(
                            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
                            addr VARCHAR(255) NOT NULL,
                            domain VARCHAR(255) NOT NULL)ENGINE = InnoDB

/ * create table addr_count * /

CREATE TABLE IF NOT EXISTS addr_count(
                            id INT NOT NULL AUTO_INCREMENT PRIMARY KEY,
                            e_addr VARCHAR(255) NOT NULL,
                            e_domain VARCHAR(255) NOT NULL,
                            count INT NOT NULL,
                            INDEX (e_addr),
                            INDEX (e_domain),
                            FOREIGN KEY (e_addr) REFERENCES mailing (addr) ON DELETE CASCADE ON UPDATE CASCADE,
                            FOREIGN KEY (e_domain) REFERENCES mailing (domain) ON DELETE CASCADE ON UPDATE CASCADE)
                            ENGINE = InnoDB

你可以帮我解决这个错误吗?对我来说一切似乎都是对的,但不确定我错过了什么!

0 个答案:

没有答案