aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb')
-rw-r--r--activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb b/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb
index c1835380f9..44a7338bf5 100644
--- a/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb
+++ b/activerecord/lib/active_record/connection_adapters/postgresql/referential_integrity.rb
@@ -14,7 +14,7 @@ module ActiveRecord
transaction(requires_new: true) do
execute(tables.collect { |name| "ALTER TABLE #{quote_table_name(name)} DISABLE TRIGGER ALL" }.join(";"))
end
- rescue => e
+ rescue ActiveRecord::ActiveRecordError => e
original_exception = e
end
@@ -34,10 +34,10 @@ Rails needs superuser privileges to disable referential integrity.
end
begin
- transaction(require_new: true) do
+ transaction(requires_new: true) do
execute(tables.collect { |name| "ALTER TABLE #{quote_table_name(name)} ENABLE TRIGGER ALL" }.join(";"))
end
- rescue
+ rescue ActiveRecord::ActiveRecordError
end
else
yield