I am trying to forward engineer my new schema onto my db server, but I can\'t figure out why I am getting this error. I\'ve tried to search for the answer here, but everyth
For MySQL (INNODB) ... get definitions for columns you want to link
SELECT * FROM information_schema.columns WHERE
TABLE_NAME IN (tb_name','referenced_table_name') AND
COLUMN_NAME IN ('col_name','referenced_col_name')\G
compare and verify both column definitions have
same COLUMN_TYPE(length), same COLATION
could be helpfull to play like
set foreign_key_checks=0;
ALTER TABLE tb_name ADD FOREIGN KEY(col_name) REFERENCES ref_table(ref_column) ON DELETE ...
set foreign_key_checks=1;