diff options
author | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2015-12-13 12:46:59 +0900 |
---|---|---|
committer | Fumiaki MATSUSHIMA <mtsmfm@gmail.com> | 2016-12-03 15:53:22 +0900 |
commit | e75fcdf3feaca7fac44dde23ea3059399c0ff384 (patch) | |
tree | d14355b4890d550393d07904155158fa88ac6648 /activerecord/test/cases/relation_test.rb | |
parent | 26ea54aa7d1b0be66d5b99cab6e2f64c80fe4757 (diff) | |
download | rails-e75fcdf3feaca7fac44dde23ea3059399c0ff384.tar.gz rails-e75fcdf3feaca7fac44dde23ea3059399c0ff384.tar.bz2 rails-e75fcdf3feaca7fac44dde23ea3059399c0ff384.zip |
Use `SET CONSTRAINTS` for `disable_referential_integrity` without superuser privileges
ref: 72c1557254
- We must use `authors` fixture with `author_addresses` because of its foreign key constraint.
- Tests require PostgreSQL >= 9.4.2 because it had a bug about `ALTER CONSTRAINTS` and fixed in 9.4.2.
Diffstat (limited to 'activerecord/test/cases/relation_test.rb')
-rw-r--r-- | activerecord/test/cases/relation_test.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/test/cases/relation_test.rb b/activerecord/test/cases/relation_test.rb index d5af0cc9a5..87e168cacf 100644 --- a/activerecord/test/cases/relation_test.rb +++ b/activerecord/test/cases/relation_test.rb @@ -6,7 +6,7 @@ require "models/rating" module ActiveRecord class RelationTest < ActiveRecord::TestCase - fixtures :posts, :comments, :authors + fixtures :posts, :comments, :authors, :author_addresses class FakeKlass < Struct.new(:table_name, :name) extend ActiveRecord::Delegation::DelegateCache |