summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/test/resources/data/schemaset.sql
blob: 0ec1ec3a0d256c1b278d81dca4162380ea652b19 (plain)
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
27
INSERT INTO DATASPACE (ID, NAME) VALUES
    (1001, 'DATASPACE-001'), (1002, 'DATASPACE-002');

INSERT INTO SCHEMA_SET (ID, NAME, DATASPACE_ID) VALUES
    (2001, 'SCHEMA-SET-001', 1001), (2002, 'SCHEMA-SET-002', 1001),
    (2100, 'SCHEMA-SET-100', 1001), -- for removal, not referenced by anchors
    (2101, 'SCHEMA-SET-101', 1001); -- for removal, having anchor and data associated

INSERT INTO YANG_RESOURCE (ID, NAME, CONTENT, CHECKSUM) VALUES
    (3001, 'module1@2020-02-02.yang', 'CONTENT-001', '877e65a9f36d54e7702c3f073f6bc42b'),
    (3002, 'module2@2020-02-02.yang', 'CONTENT-002', '88892586b1f23fe8c1595759784a18f8'),
    (3003, 'module3@2020-02-02.yang', 'CONTENT-003', 'fc5740499a09a48e0c95d6fc45d4bde8'),
    (3004, 'module4@2020-02-02.yang', 'CONTENT-004', '3801280fe532f5cbf535695cf6122026'),
    (3100, 'orphan@2020-02-02.yang', 'ORPHAN', 'checksum'); -- for auto-removal as orphan

INSERT INTO SCHEMA_SET_YANG_RESOURCES (SCHEMA_SET_ID, YANG_RESOURCE_ID) VALUES
    (2001, 3001), (2001, 3002),
    (2002, 3003), (2002, 3004),
    (2100, 3003), (2100, 3100), -- orphan removal case
    (2101, 3003), (2101, 3004);

INSERT INTO ANCHOR (ID, NAME, DATASPACE_ID, SCHEMA_SET_ID) VALUES -- anchors for removal
    (6001, 'ANCHOR1', 1001, 2101),
    (6002, 'ANCHOR2', 1001, 2101);

INSERT INTO FRAGMENT (ID, XPATH, ANCHOR_ID, DATASPACE_ID) VALUES
    (7001, '/XPATH', 6001, 1001);