表 ENUMSTATE 正在重试 ENUMCOUNTRY 但
此代码导致此错误:错误代码:1005。无法创建表“easylibdb1.enumstate”(错误号:150)
=> 枚举国家
CREATE TABLE IF NOT EXISTS ENUMCOUNTRY(
ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
NAME VARCHAR(50) DEFAULT '',
SHORTNAME VARCHAR(50) DEFAULT '',
STATUS BIT DEFAULT FALSE,
PRIMARY KEY (ID)
)
=> 枚举状态
CREATE TABLE IF NOT EXISTS ENUMSTATE(
ID INT UNSIGNED NOT NULL AUTO_INCREMENT,
NAME VARCHAR(50) DEFAULT '',
SHORTNAME VARCHAR(50) DEFAULT '',
STATUS BIT DEFAULT FALSE,
COUNTRYID INT,
PRIMARY KEY (ID)
FOREIGN KEY (COUNTRYID) REFERENCES ENUMCOUNTRY(ID)
)