diff options
author | Godfrey Chan <godfreykfc@gmail.com> | 2014-06-27 17:40:23 -0700 |
---|---|---|
committer | Godfrey Chan <godfreykfc@gmail.com> | 2014-06-27 17:40:23 -0700 |
commit | e6ca8e2c133e20a674e2fb7270abddb2b5f53006 (patch) | |
tree | 5ea8e8c72c0323ee082f0e277cf2ea719d335b83 | |
parent | 6a1af00d7046ee59cdb950bd367c77b9f3b8e516 (diff) | |
parent | e31104c102cbc9a354a6f0e19a3373f42d8ae069 (diff) | |
download | rails-e6ca8e2c133e20a674e2fb7270abddb2b5f53006.tar.gz rails-e6ca8e2c133e20a674e2fb7270abddb2b5f53006.tar.bz2 rails-e6ca8e2c133e20a674e2fb7270abddb2b5f53006.zip |
Merge pull request #15951 from pcreux/fix-mysql-test-fk
MySQL doesn't work with foreign keys
-rw-r--r-- | activerecord/test/schema/schema.rb | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/activerecord/test/schema/schema.rb b/activerecord/test/schema/schema.rb index a9a4acdfce..7dbb29d9b0 100644 --- a/activerecord/test/schema/schema.rb +++ b/activerecord/test/schema/schema.rb @@ -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 |