diff options
author | Ruslan Kashapov <ruslan.kashapov@pantheon.tech> | 2021-01-11 15:34:10 +0200 |
---|---|---|
committer | Ruslan Kashapov <ruslan.kashapov@pantheon.tech> | 2021-01-18 17:44:56 +0200 |
commit | 6f25d3a2ae84aff3f22b50d10592c5321a7c98ce (patch) | |
tree | 7edb777884552ed4e8f28e8f0d66a5cbd22ea0ea /cps-ri/src/test/resources | |
parent | aee547cfbeb8780ed21d2ee902110a888aee3b56 (diff) |
Delete schema set - persistence layer
Issue-ID: CPS-121
Change-Id: I6fc8343969971b76d7f78ad202dd8ec1058c03fb
Signed-off-by: Ruslan Kashapov <ruslan.kashapov@pantheon.tech>
Diffstat (limited to 'cps-ri/src/test/resources')
-rw-r--r-- | cps-ri/src/test/resources/data/schemaset.sql | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/cps-ri/src/test/resources/data/schemaset.sql b/cps-ri/src/test/resources/data/schemaset.sql index e3fc69b086..0ec1ec3a0d 100644 --- a/cps-ri/src/test/resources/data/schemaset.sql +++ b/cps-ri/src/test/resources/data/schemaset.sql @@ -2,13 +2,26 @@ 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); + (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'); + (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); + (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); |