chore: add migration to perform the backfill (#9500)

This commit is contained in:
Adrián Peña authored and GitHub committed 2025-12-10 16:39:12 +01:00
1 parent 8588cc03f4
commit 4addfcc848
2 files changed
+32 -4

No files matched your search

+2 -4
View File
@@ -1,6 +1,8 @@
from collections import defaultdict
from datetime import timedelta
from django.db.models import Sum
from django.utils import timezone
from api.db_router import READ_REPLICA_ALIAS
from api.db_utils import rls_transaction
@@ -186,10 +188,6 @@ def backfill_daily_severity_summaries(tenant_id: str, days: int = None):
Backfill DailySeveritySummary from completed scans.
Groups by provider+date, keeps latest scan per day.
"""
from datetime import timedelta
from django.utils import timezone
created_count = 0
updated_count = 0