-
Notifications
You must be signed in to change notification settings - Fork 0
/
schedule_refresh.sql
26 lines (13 loc) · 1.54 KB
/
schedule_refresh.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
SELECT cron.schedule('refresh organization locations', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."OrganizationLocations_mv"');
SELECT cron.schedule('refresh organizations', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."Organizations_mv"');
SELECT cron.schedule('refresh dcyf referral compliment', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."ServiceReferralIdsNonDCYF_mv"');
SELECT cron.schedule('refresh timeline stages', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."ServiceReferralTimelineStages_mv"');
SELECT cron.schedule('refresh referrals', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."ServiceReferrals_mv"');
SELECT cron.schedule('refresh stage types', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."StageTypes_mv"');
SELECT cron.schedule('refresh uir action types', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."UnusualIncidentActionTypes_mv"');
SELECT cron.schedule('refresh uir parties', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."UnusualIncidentInvolvedParties_mv"');
SELECT cron.schedule('refresh uir party types', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."UnusualIncidentInvolvedPartyTypes_mv"');
SELECT cron.schedule('refresh uir actions', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."UnusualIncidentReportActions_mv"');
SELECT cron.schedule('refresh uir', '0 22 * * *', 'REFRESH MATERIALIZED VIEW curated."UnusualIncidentReports_mv"');
SELECT cron.schedule('refresh visit reports', '15 22 * * *', 'REFRESH MATERIALIZED VIEW curated."VisitReports_mv"');
UPDATE cron.job SET database = 'sprout_replica';