From c031016558d7be757c9216186670bf3418a1a6ae Mon Sep 17 00:00:00 2001 From: Godfrey Chan Date: Sat, 5 Jul 2014 13:24:24 -0700 Subject: Fix mysql/mysql2 failing with FK constraint errors One of the author fixture we have ("david") references an author address by ID. Since we disable FK checks when inserting fixtures, this is all fine until we try to update it, at which point MySQL would complain about the missing row referenced by the `author_address_id`. [Godfrey Chan, Matthew Draper] --- activerecord/test/cases/persistence_test.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'activerecord/test/cases') diff --git a/activerecord/test/cases/persistence_test.rb b/activerecord/test/cases/persistence_test.rb index 9b762fc0d5..2170fe6118 100644 --- a/activerecord/test/cases/persistence_test.rb +++ b/activerecord/test/cases/persistence_test.rb @@ -20,7 +20,7 @@ require 'models/toy' require 'rexml/document' class PersistenceTest < ActiveRecord::TestCase - fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :categorizations, :categories, :posts, :minivans, :pets, :toys + fixtures :topics, :companies, :developers, :projects, :computers, :accounts, :minimalistics, 'warehouse-things', :authors, :author_addresses, :categorizations, :categories, :posts, :minivans, :pets, :toys # Oracle UPDATE does not support ORDER BY unless current_adapter?(:OracleAdapter) -- cgit v1.2.3