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 ine84799d
but broken in3f596f8
. This commit reintroduced the conditional that prevents the foreign keys from being added to MySQL databases.
This commit is contained in:
parent
6a1af00d70
commit
e31104c102
1 changed files with 4 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue