From e4e253ce4446bd1dfe8171dfaee30ae6d66c2c1a Mon Sep 17 00:00:00 2001 From: Rebecca Law Date: Mon, 21 May 2018 11:54:49 +0100 Subject: [PATCH] Remove where clause for notification_status --- app/commands.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/app/commands.py b/app/commands.py index ad425139b..d55f8a1b5 100644 --- a/app/commands.py +++ b/app/commands.py @@ -444,11 +444,9 @@ def migrate_data_to_ft_billing(start_date, end_date): 1 as notifications_sent from public.notification_history n left join services s on s.id = n.service_id - where n.notification_status!='technical-failure' - and n.key_type!='test' + where n.key_type!='test' and n.notification_status in ('sending', 'sent', 'delivered', 'temporary-failure', 'permanent-failure', 'failed') - and n.notification_status!='created' and n.created_at >= (date :start + time '00:00:00') at time zone 'Europe/London' at time zone 'UTC' and n.created_at < (date :end + time '00:00:00') at time zone 'Europe/London' at time zone 'UTC'