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
8 # http://www.apache.org/licenses/LICENSE-2.0
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.
16 # SPDX-License-Identifier: Apache-2.0
17 # ============LICENSE_END=========================================================
22 label: dmi-registry-schema-preload
26 file: 'changelog/db/changes/data/dmi/fragment.csv'
58 header: schema_node_id
62 sql: DELETE FROM fragment WHERE xpath = '/dmi-registry' AND anchor_id = (select id from anchor where name='ncmp-dmi-registry') AND dataspace_id = (select id from dataspace where name='NCMP-Admin')
63 comment: Removes the fragment added by fragment.csv file
67 label: dmi-registry-schema-preload
71 comment: Fixes the id sequence after data insert with predefined ids
73 sql: ALTER SEQUENCE IF EXISTS fragment_id_seq RESTART WITH 200
75 comment: Rollback for 10.1 is not supported. Please rollback change set 10 to undo change set 10.1. Cannot revert sequence altering.
79 label: dmi-registry-schema-preload
83 comment: Sets sequence value to current max value of the ID from the fragment table
85 sql: SELECT setval('fragment_id_seq', (SELECT MAX(ID) FROM fragment))
87 sql: SELECT setval('fragment_id_seq', 200)
88 comment: Rollback Sequence to restart with the sequence number in the last changeset