Skip to content

Commit e28a609

Browse files
committed
Ensure triggers are enabled when operation fails in PostgreSQL
1 parent 139c567 commit e28a609

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

activerecord/lib/active_record/connection_adapters/abstract/database_statements.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -457,8 +457,8 @@ def insert_fixtures_set(fixture_set, tables_to_delete = [])
457457
statements = table_deletes + fixture_inserts
458458

459459
with_multi_statements do
460-
disable_referential_integrity do
461-
transaction(requires_new: true) do
460+
transaction(requires_new: true) do
461+
disable_referential_integrity do
462462
execute_batch(statements, "Fixtures Load")
463463
end
464464
end

0 commit comments

Comments
 (0)