Re: ERROR 1005: Can't create table (errno: 150) :: InnoDB
Date: June 09, 2005 04:22AM
In the manual search for this chapter "Creating InnoDB Tables" and the title "FOREIGN KEY Constraints"...
Foreign keys definitions are subject to the following conditions:
- Both tables must be InnoDB type.
- In the referencing table, there must be an index where the foreign key columns are listed as the first columns in the same order.
- In the referenced table, there must be an index where the referenced columns are listed as the first columns in the same order.
- Index prefixes on foreign key columns are not supported. One consequence of this is that BLOB and TEXT columns cannot be included in a foreign key, because indexes on those columns must always include a prefix length.