forked from stormliucong/eMERGE-Columbia-Data-Sync-Service
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrefresh_alert.sql
More file actions
23 lines (21 loc) · 762 Bytes
/
refresh_alert.sql
File metadata and controls
23 lines (21 loc) · 762 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
-- The purpose is to refresh the alert setting to see whether the alert works as expected.
-- Should not use this in a production server b/c all the alert will be triggered again
DELETE FROM emerge4cuimclocalredcap.redcap_alerts_sent
where alert_id in
(SELECT alert_id FROM emerge4cuimclocalredcap.redcap_alerts
where project_id = 33
);
DELETE FROM emerge4cuimclocalredcap.redcap_alerts_recurrence
where alert_id in
(SELECT alert_id FROM emerge4cuimclocalredcap.redcap_alerts
where project_id = 33
);
DELETE FROM emerge4cuimclocalredcap.redcap_alerts_sent_log
WHERE alert_sent_id in
(
SELECT alert_sent_id FROM emerge4cuimclocalredcap.redcap_alerts_sent
where alert_id in
(SELECT alert_id FROM emerge4cuimclocalredcap.redcap_alerts
where project_id = 33
)
);