Adding missing rollback for Liquibase change logs
[cps.git] / cps-ri / src / main / resources / changelog / db / changes / 11-add-column-to-yang-resources-table.yaml
1 # ============LICENSE_START=======================================================
2 # Copyright (C) 2021-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       id: 11
22       label: add-module-name-and-revision-column
23       author: cps
24       changes:
25         - addColumn:
26             tableName: yang_resource
27             columns:
28               - column:
29                   name: module_name
30                   type: TEXT
31               - column:
32                   name: revision
33                   type: TEXT
34
35   - changeSet:
36       id: 11.1
37       label: update-previous-data-module-name-and-revision
38       author: cps
39       changes:
40         - sql:
41             sql: update yang_resource set module_name = 'dummy_module_name', revision = '2021-08-04' where module_name is null and revision is null
42       rollback:
43         comment: Rollback for change set 11.1 is not supported. Please rollback change set 11 to rollback changeset 11.1. Change set 11.1 removes null values from the yang_resource table created by change set 11.