Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languageyml
titleAdd Columns within test table
collapsetrue
databaseChangeLog:
  - changeSet:
      id: 13-1
      author: cps
      changes:
        - addColumn:
            tableName: test_table
            columns:
              - column:
                  name: new_column1
                  type: TEXT
              - column:
                  name: new_column2
                  type: INTEGER

...

Load Data

The data for each table is defined using the CSV files located within cps-ri->resources->changelog->db.changes->data→dmi.

Code Block
languagebash
titletest_table.csv
collapsetrue
renamed_column|new_column1|new_column2
test_table_column_name|columnValue|3

Then each table has a specific YAML change-set which loads the CSV using the following syntax.

Code Block
languageyml
titleLoad Data into Test Table
collapsetrue
databaseChangeLog:
  - changeSet:
      author: cps
      label: xnf-data-preload
      id: 14.1
      loadUpdateData:
        encoding: UTF-8
        file: 'changelog/db/changes/data/test_table.csv'
        onlyUpdate: 'false'
        primaryKey: 'id'
        quotchar: '"'
        separator: '|'
        tableName: 'test_table'


test table with data

Image Added

Adding New Yang Resource

Generating Checksum

...