• MySQL полчаса продолбался. судя по документации dev.mysql.com внешний ключ можно описывать так:
    create table foo (id int primary key auto_increment, name varchar(100));
    create table foo2(id int primary key auto_icnrement, foo_id int references foo(id) on delete cascade);

    и только сечас прочитал внимательней:
    InnoDB does not recognize or support “inline REFERENCES specifications” (as defined in the SQL standard) where the references are defined as part of the column specification. InnoDB accepts REFERENCES clauses only when specified as part of a separate FOREIGN KEY specification.