Mysql FullText Syntax Error #1215 -


i have 3 table

create table tag (   name varchar(294) not null,   inserted_at datetime not null,   status integer not null,   primary key (name) ) engine=innodb;  create table item (   id integer not null auto_increment,   name varchar(294) not null,   price integer not null,   discounted_price integer default null,   unit varchar(294) not null,   additional_message text not null,   stock integer not null,   is_featured integer not null,   inserted_at datetime not null,   status integer not null,   primary key (id) ) engine=innodb;  alter table item add fulltext(name, additional_message);  create table item_tag (   id integer not null auto_increment,   item_id integer not null,    tag_name varchar(294) not null,   inserted_at datetime not null,   status integer not null,   primary key (id),   foreign key (tag_name) references tag(name),   foreign key (item_id) references item(id) ) engine=innodb;  alter table item_tag add fulltext(tag_name); 

the first alter command works perfectly, second not. return #1215 - cannot add foreign key constraint.

do know why?, or better, how fix ?

as far know cannot have mysql 5.5 not support fulltext , foreign key constraint on same. can create either of them working.


Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -