Update dmi-registry yang to support cmHandle State
[cps.git] / cps-ri / src / main / resources / changelog / db / changes / 13-insert-dmi-registry-2022-02-10-schema-set.yaml
1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2022 Nordix Foundation.
3 # ================================================================================
4 # Licensed under the Apache License, Version 2.0 (the "License");
5 # you may not use this file except in compliance with the License.
6 # You may obtain a copy of the License at
7 #
8 #       http://www.apache.org/licenses/LICENSE-2.0
9 #
10 # Unless required by applicable law or agreed to in writing, software
11 # distributed under the License is distributed on an "AS IS" BASIS,
12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 # See the License for the specific language governing permissions and
14 # limitations under the License.
15 #
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
18
19 databaseChangeLog:
20   - changeSet:
21       author: cps
22       label: dmi-registry-schema-load-revision-2022-02-10
23       id: 13
24       loadUpdateData:
25         encoding: UTF-8
26         file: 'changelog/db/changes/data/dmi/generated-csv/generated_yang_resource_dmi-registry@2022-02-10.csv'
27         onlyUpdate: 'false'
28         primaryKey: 'id'
29         quotchar: '"'
30         separator: '|'
31         tableName: 'yang_resource'
32         columns:
33           - column:
34               header: name
35               name: name
36               type: STRING
37           - column:
38               header: content
39               name: content
40               type: STRING
41           - column:
42               header: checksum
43               name: checksum
44               type: STRING
45           - column:
46               header: module_name
47               name: module_name
48               type: STRING
49           - column:
50               header: revision
51               name: revision
52               type: STRING
53       rollback:
54         - sql:
55             sql: delete from yang_resource where name = 'dmi-registry@2022-02-10.yang'
56
57   - changeSet:
58       author: cps
59       label: dmi-registry-schema-load-revision-2022-02-10
60       id: 13.1
61       sql: INSERT INTO schema_set_yang_resources (schema_set_id, yang_resource_id)
62         VALUES ((select id from schema_set where name = 'ncmp-dmi-registry-model'), (select id from yang_resource where name = 'dmi-registry@2022-02-10.yang'));
63       rollback:
64         sql: delete from schema_set_yang_resources
65           where schema_set_id = (select id from schema_set where name = 'ncmp-dmi-registry-model')
66           and yang_resource_id = (select id from yang_resource where name = 'dmi-registry@2022-02-10.yang')