From 42a80a1ca36330b48e19d21f228714fd579d7c0d Mon Sep 17 00:00:00 2001 From: Jimmy Domagala-Tang Date: Tue, 28 Oct 2025 14:56:54 -0400 Subject: [PATCH] feat: moving to grouping by primarily recipient, then by project GitOrigin-RevId: 31e3420d6f5834a9da405eea99f2f353a39a0f11 --- ...ations_index_from_scheduledAt_to_recipient_id.mjs} | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) rename tools/migrations/{20251023094210_change_emailtNotifications_index_from_scheduledAt_to_createdAt.mjs => 20251023094210_change_emailtNotifications_index_from_scheduledAt_to_recipient_id.mjs} (84%) diff --git a/tools/migrations/20251023094210_change_emailtNotifications_index_from_scheduledAt_to_createdAt.mjs b/tools/migrations/20251023094210_change_emailtNotifications_index_from_scheduledAt_to_recipient_id.mjs similarity index 84% rename from tools/migrations/20251023094210_change_emailtNotifications_index_from_scheduledAt_to_createdAt.mjs rename to tools/migrations/20251023094210_change_emailtNotifications_index_from_scheduledAt_to_recipient_id.mjs index 6f7ede2d2e..c863564f19 100644 --- a/tools/migrations/20251023094210_change_emailtNotifications_index_from_scheduledAt_to_createdAt.mjs +++ b/tools/migrations/20251023094210_change_emailtNotifications_index_from_scheduledAt_to_recipient_id.mjs @@ -18,16 +18,9 @@ const oldIndexes = [ const newIndexes = [ { key: { - createdAt: 1, + recipient_id: 1, }, - name: 'createdAt_1', - expireAfterSeconds: 60 * 60 * 24, // expire after 24 hours - }, - { - key: { - project_id: 1, - }, - name: 'project_id_1', + name: 'recipientId_1', expireAfterSeconds: 60 * 60 * 24, // expire after 24 hours }, ]