I learned today on #dbix-class that MySQL supports foreign key definitions in create table
statements, but not inline declarations. That is, MySQL understands this syntax:
create table book ( id int, author_id int, FOREIGN KEY fk_author_id (author_id) REFERENCES author (id) ) TYPE=InnoDB;
create table book ( id int, author_id int references author (id), ) TYPE=InnoDB;
use SQL::Translator; my $infile = shift || die "Syntax: $0 schema.sql > schema_mysql.sql\n"; my $translator = SQL::Translator->new( from => 'MySQL', to => 'MySQL', add_drop_table => 1); print $translator->translate(filename => $infile);