diff options
Diffstat (limited to 'db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb')
-rw-r--r-- | db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb b/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb index 1199073ed3a..35e95e6b80a 100644 --- a/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb +++ b/db/migrate/20170530130129_project_foreign_keys_with_cascading_deletes.rb @@ -106,11 +106,11 @@ class ProjectForeignKeysWithCascadingDeletes < ActiveRecord::Migration # Disables statement timeouts for the current connection. This is # necessary as removing of orphaned data might otherwise exceed the # statement timeout. - disable_statement_timeout + disable_statement_timeout(transaction: false) do + remove_orphans(*queue.pop) until queue.empty? - remove_orphans(*queue.pop) until queue.empty? - - steal_from_queues(queues - [queue]) + steal_from_queues(queues - [queue]) + end end end end |