mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
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]
This commit is contained in:
parent
6787507883
commit
c031016558
1 changed files with 1 additions and 1 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue