From 5b4b23809863e353fd132aa174d9d3548f4cd860 Mon Sep 17 00:00:00 2001 From: poveyd <32199157+poveyd@users.noreply.github.com> Date: Tue, 28 Apr 2020 10:21:51 +0100 Subject: [PATCH] Update cycle_notification_history.sql --- database_maintenance/cycle_notification_history.sql | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/database_maintenance/cycle_notification_history.sql b/database_maintenance/cycle_notification_history.sql index 089e1eef2..f88dcaa0d 100644 --- a/database_maintenance/cycle_notification_history.sql +++ b/database_maintenance/cycle_notification_history.sql @@ -2,13 +2,13 @@ CREATE TABLE notification_history_pivot AS SELECT * FROM notification_history WHERE 1=2; ALTER TABLE notification_history_pivot ADD PRIMARY KEY (id); -create trigger to update temp_notification_history when update to notification_history +create trigger to update notification_history_pivot when update to notification_history create foreign key constraints in notification_history_pivot -insert data into temp_notification_history in batches +insert data into notification_history_pivot in batches -create remaining indices +create remaining indices on notification_history_pivot -- Run basic sanity checks on data in notification_history_pivot, ensuring same number of entries present in notification_history and notification_history_pivot