summaryrefslogtreecommitdiffstats
path: root/cps-ri/src/test/resources/data/schemaset.sql
blob: e6306d0d0fdc9324b03f35d8661c7b0a139976ea (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', 'e8bdda931099310de66532e08c3fafec391db29f55c81927b168f6aa8f81b73b'),
    (3002, 'module2@2020-02-02.yang', 'CONTENT-002', '7e7d48afbe066ed0a890a09081859046d3dde52300dfcdb13be5b20780353a11'),
    (3003, 'module3@2020-02-02.yang', 'CONTENT-003', 'ca20c45fec8547633f05ff8905c48ffa7b02b94ec3ad4ed79922e6ba40779df3'),
    (3004, 'module4@2020-02-02.yang', 'CONTENT-004', 'f6ed09d343562e4d4ae5140f3c6a55df9c53f6da8e30dda8cbd9eaf9cd449be0'),
    (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);