@@ -5,26 +5,15 @@ update alerts.query set email_template='/email/annotations' where name='Annotati
5
5
6
6
-- 2. My Annotations now uses its own template. To update the template, run the following query:
7
7
update alerts .query set email_template= ' /email/myAnnotations' where name= ' My Annotations' ;
8
+ -- - check
9
+
8
10
9
11
-- 3. Annotation on records for Dataset / collections / species now uses its "Annotation" template. To update the template, run the following query:
10
12
11
13
UPDATE alerts .query
12
14
SET email_template = ' /email/annotations'
13
15
WHERE name LIKE ' New annotations on%' ;
14
16
15
- -- 4. Species List Annotations now share the same template with datasets. To update the template, run the following query:
16
- -- 4.1 Update fire_when_change to false for species list queries
17
-
18
- UPDATE alerts .property_path
19
- SET fire_when_change = false
20
- WHERE query_id IN (
21
- SELECT query_id
22
- FROM query
23
- WHERE email_template = ' /email/specieslists'
24
- );
25
-
26
- -- -- 4.2
27
- -- update alerts.query set email_template="/email/datasets" where email_template='/email/specieslists';
28
17
29
18
-- - disable fire_when_change for spatial layer
30
19
UPDATE alerts .property_path
@@ -62,11 +51,11 @@ WHERE
62
51
63
52
-- Update some queries using api.test.ala.org.au and api.ala.org.au
64
53
65
- UPDATE alerts .query
66
- SET
67
- base_url = ' https://biocache-ws-test.ala.org.au/ws'
68
- WHERE
69
- base_url LIKE ' https://api.test.ala.org.au/occurrences%' ;
54
+ -- UPDATE alerts.query
55
+ -- SET
56
+ -- base_url = 'https://biocache-ws-test.ala.org.au/ws'
57
+ -- WHERE
58
+ -- base_url LIKE 'https://api.test.ala.org.au/occurrences%';
70
59
71
60
72
61
UPDATE alerts .query
@@ -96,12 +85,22 @@ UPDATE `alerts`.`query`
96
85
` base_url_forui` = ' https://lists.ala.org.au'
97
86
WHERE (` id` = ' Replace it' );
98
87
88
+ -- 4. Species List Annotations now share the same template with datasets. To update the template, run the following query:
89
+ -- 4.1 Update fire_when_change to false for species list queries
90
+
91
+ -- - NOT WORKING
92
+ -- - ************************
93
+ UPDATE alerts .property_path
94
+ SET fire_when_change = false,
95
+ json_path = ' $.lists'
96
+ WHERE query_id = [species list query id: 556 ];
97
+
99
98
100
99
-- - Update query of datasets to match query of datasetResource
101
100
102
101
-- - If datasetResource query already exists, then update the query id of the subscribers to datasetResource query id
103
102
-- - Find the query id which needs to migrate subscribers to datasetResource. e.g. query id: 7
104
- select * from notification where query_id = [id];
103
+ select * from notification where query_id = [id: 7 ];
105
104
-- - find subscribers details
106
105
select * from user where id in (SELECT user_id FROM alerts .notification where query_id= [id]);
107
106
@@ -115,6 +114,8 @@ SET `base_url` = 'https://biocache-ws.ala.org.au/ws',
115
114
` id_json_path` = ' i18nCode' ,
116
115
` query_path` = ' /occurrences/search?q=*:*&facet=true&flimit=-1&facets=dataResourceUid&pageSize=0' ,
117
116
` record_json_path` = ' $.facetResults[0].fieldResult[*]' ,
118
- ` email_template` = ' /email/specieslist' ,
119
- ` base_url_forui` = ' https://collections-test.ala.org.au'
120
- WHERE (` id` = ' Replace it' );
117
+ ` email_template` = ' /email/dataresource' ,
118
+ ` base_url_forui` = ' https://collections.ala.org.au'
119
+ WHERE (` id` = ' Replace it:7' );
120
+
121
+ update property_path set json_path= ' $.facetResults[0].fieldResult' , fire_when_change= false where id= [property_path id:12 ];
0 commit comments