1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

MySQL doesn't work with foreign keys

This was previously fixed in e84799d but broken in 3f596f8. This commit
reintroduced the conditional that prevents the foreign keys from being
added to MySQL databases.
This commit is contained in:
Philippe Creux 2014-06-27 17:36:43 -07:00
parent 6a1af00d70
commit e31104c102

View file

@ -83,7 +83,10 @@ ActiveRecord::Schema.define do
create_table :author_addresses, force: true do |t|
end
add_foreign_key :authors, :author_addresses
unless current_adapter?(:MysqlAdapter, :Mysql2Adapter)
add_foreign_key :authors, :author_addresses
end
create_table :author_favorites, force: true do |t|
t.column :author_id, :integer