We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 1f91c61 commit 98cd7d2Copy full SHA for 98cd7d2
lib/active_record/connection_adapters/cockroachdb/referential_integrity.rb
@@ -11,6 +11,14 @@ module ActiveRecord
11
module ConnectionAdapters
12
module CockroachDB
13
module ReferentialIntegrity
14
+ # CockroachDB will raise a `PG::ForeignKeyViolation` when re-enabling
15
+ # referential integrity (e.g: adding a foreign key with invalid data
16
+ # raises).
17
+ # So foreign keys should always be valid for that matter.
18
+ def all_foreign_keys_valid?
19
+ true
20
+ end
21
+
22
def disable_referential_integrity
23
foreign_keys = tables.map { |table| foreign_keys(table) }.flatten
24
0 commit comments