@@ -11,6 +11,8 @@ CREATE TABLE ${ohdsiSchema}.concept_set_annotation
11
11
created_date TIMESTAMP WITH TIME ZONE NOT NULL DEFAULT (now()),
12
12
modified_by_id INTEGER ,
13
13
modified_date TIMESTAMP WITH TIME ZONE ,
14
+ concept_set_version VARCHAR (100 ),
15
+ copied_from_concept_set_ids VARCHAR (1000 ),
14
16
CONSTRAINT pk_concept_set_annotation_id PRIMARY KEY (concept_set_annotation_id),
15
17
CONSTRAINT fk_concept_set FOREIGN KEY (concept_set_id)
16
18
REFERENCES ${ohdsiSchema}.concept_set (concept_set_id)
@@ -20,20 +22,24 @@ CREATE TABLE ${ohdsiSchema}.concept_set_annotation
20
22
INSERT INTO ${ohdsiSchema}.sec_permission(id, value, description) VALUES
21
23
(nextval(' ${ohdsiSchema}.sec_permission_id_seq' ), ' conceptset:*:annotation:put' , ' Create Concept Set Annotation' );
22
24
INSERT INTO ${ohdsiSchema}.sec_permission(id, value, description) VALUES
23
- (nextval(' ${ohdsiSchema}.sec_permission_id_seq' ), ' conceptset:annotation:%s :delete' , ' Delete Concept Set Annotation' );
25
+ (nextval(' ${ohdsiSchema}.sec_permission_id_seq' ), ' conceptset:annotation:* :delete' , ' Delete Concept Set Annotation' );
24
26
INSERT INTO ${ohdsiSchema}.sec_permission(id, value, description) VALUES
25
27
(nextval(' ${ohdsiSchema}.sec_permission_id_seq' ), ' conceptset:%s:annotation:get' , ' List Concept Set Annotation' );
26
28
INSERT INTO ${ohdsiSchema}.sec_permission(id, value, description) VALUES
27
29
(nextval(' ${ohdsiSchema}.sec_permission_id_seq' ), ' conceptset:*:annotation:get' , ' View Concept Set Annotation' );
30
+ INSERT INTO ${ohdsiSchema}.sec_permission(id, value, description) VALUES
31
+ (nextval(' ${ohdsiSchema}.sec_permission_id_seq' ), ' conceptset:copy-annotations' , ' Copy Concept Set Annotations' );
32
+
28
33
29
34
INSERT INTO ${ohdsiSchema}.sec_role_permission(id, role_id, permission_id)
30
35
SELECT nextval(' ${ohdsiSchema}.sec_role_permission_sequence' ), sr .id , sp .id
31
36
FROM ${ohdsiSchema}.sec_permission SP, ${ohdsiSchema}.sec_role sr
32
37
WHERE sp .value IN (
33
38
' conceptset:*:annotation:put' ,
34
- ' conceptset:annotation:%s :delete' ,
39
+ ' conceptset:annotation:* :delete' ,
35
40
' conceptset:%s:annotation:get' ,
36
- ' conceptset:*:annotation:get'
41
+ ' conceptset:*:annotation:get' ,
42
+ ' conceptset:copy-annotations'
37
43
) AND sr .name IN (' admin' );
38
44
39
45
INSERT INTO ${ohdsiSchema}.sec_role_permission(id, role_id, permission_id)
@@ -42,5 +48,6 @@ FROM ${ohdsiSchema}.sec_permission SP, ${ohdsiSchema}.sec_role sr
42
48
WHERE sp .value IN (
43
49
' conceptset:*:annotation:put' ,
44
50
' conceptset:%s:annotation:get' ,
45
- ' conceptset:*:annotation:get'
51
+ ' conceptset:*:annotation:get' ,
52
+ ' conceptset:copy-annotations'
46
53
) AND sr .name IN (' Atlas users' );
0 commit comments