Hi. Creating the below to tables give errno 150, any idea why?
CREATE TABLE categories (
id int(11) unsigned NOT NULL auto_increment,
name varchar(64) NOT NULL,
PRIMARY KEY (id),
UNIQUE KEY name (name)
) TYPE=InnoDB;
CREATE TABLE types (
id int(11) unsigned NOT NULL auto_increment,
category_id int(11) unsigned NOT NULL,
name varchar(64) NOT NULL,
PRIMARY KEY (id),
FOREIGN KEY (category_id) REFERENCES categories(id)
) TYPE=InnoDB;
Br,
Morten
Comment