I'm trying to use Foreigner to enable foreign key constraints in Rails. It's working on my development DB, but I get the following error when I try to run my tests:
Errors running test:units! #<ActiveRecord::StatementInvalid: Mysql2::Error: Can't create table
'arizona_test.#sql-368_be' (errno: 150): ALTER TABLE `arizona_downloads` ADD CONSTRAINT
`arizona_downloads_ibfk_1` FOREIGN KEY (`books_id`) REFERENCES `books`(id) ON DELETE SET NULL>
Oddly, the tests run fine, and I get this error at the end.
I suspect that Foreigner is trying to use SQLite syntax for the test DB, unaware that I am using MySQL (and the mysql2 adapter). Is there a way to tell Foreigner that I'm using MySQL for the test database?