Subject: | Upgrading enum to foreign key can cause error |
If you have two tables, and then change an enum in the first to a foreign key in the second, the
reasonable SQL you get from SQL::Translator triggers error 150 from inside of MySQL.
If the second table did not exist at the start, the error goes away.
I suspect a MySQL bug.
See https://gist.github.com/1152817 for a script that translates between 2 SQL statements that
demonstrates the error. If I load the dest SQL into my database, then apply the diff SQL, I get
the reported error.