You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@dmitry-sinina Hi, I have a question related to the current issue.
Do you suggest to delete number list in the case when it has a related customer_auth record?
Technically we can nullify column src_numberlist_id of Customer Auth before deleting "Number list" by using dependent: :nullify option.
The dependent action for src_customers_auths and
dst_customers_auths in the numberlist model has
been changed from restrict_with_error to nullify.
This was to allow for deletion of a numberlist
item even when it has related customer_auths.
Corresponding test cases have been added to ensure
expected behavior.
…y and resilience
The AsyncBatchDestroyJob has been refactored to utilise Rails's `find_in_batches`
method as opposed to a custom SQL query. This proves to make the process of record
deletion both more efficient and more resilient to database inconsistencies.
Previously, records that could not be deleted due to dependencies would raise an
exception, breaking the whole transaction. Now, these records are logged and
skipped over instead. Updates to associated tests have been made to verify and
reflect these changes.
The text was updated successfully, but these errors were encountered: