Updated code comments for clarity based on 2 years

This commit is contained in:
Jeremy Watson 2018-10-06 10:09:49 +00:00
parent b0ae67a4ec
commit 533a6fef31
1 changed files with 2 additions and 3 deletions

View File

@ -6,9 +6,8 @@ class PruneOldEventsWorker
# rubocop: disable CodeReuse/ActiveRecord
def perform
# Contribution calendar shows maximum 12 months of events.
# Double nested query is used because MySQL doesn't allow DELETE subqueries
# on the same table.
# Contribution calendar shows maximum 12 months of events, we retain 2 years for data integrity.
# Double nested query is used because MySQL doesn't allow DELETE subqueries on the same table.
Event.unscoped.where(
'(id IN (SELECT id FROM (?) ids_to_remove))',
Event.unscoped.where(