Skip to content

Commit

Permalink
Fix mysql/mysql2 failing with FK constraint errors
Browse files Browse the repository at this point in the history
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]
  • Loading branch information
chancancode committed Jul 5, 2014
1 parent 6787507 commit c031016
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion activerecord/test/cases/persistence_test.rb
Expand Up @@ -20,7 +20,7 @@
require 'rexml/document' require 'rexml/document'


class PersistenceTest < ActiveRecord::TestCase 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 # Oracle UPDATE does not support ORDER BY
unless current_adapter?(:OracleAdapter) unless current_adapter?(:OracleAdapter)
Expand Down

0 comments on commit c031016

Please sign in to comment.