提交 e31104c1 编写于 作者: P Philippe Creux

MySQL doesn't work with foreign keys

This was previously fixed in e84799d9 but broken in 3f596f8a. This commit
reintroduced the conditional that prevents the foreign keys from being
added to MySQL databases.
上级 6a1af00d
......@@ -83,7 +83,10 @@ def except(adapter_names_to_exclude)
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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册