From e31104c102cbc9a354a6f0e19a3373f42d8ae069 Mon Sep 17 00:00:00 2001 From: Philippe Creux Date: Fri, 27 Jun 2014 17:36:43 -0700 Subject: 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. --- activerecord/test/schema/schema.rb | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'activerecord') 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 -- cgit v1.2.3