General error: 1215 Cannot add foreign key constrain code example
Example: error code 1215 cannot add foreign key constraint
Try this if are data in one or more tables from foreign key references
set foreign_key_checks=0;
Else it is a problem in forign key parameters (references parameters)