Versions Compared

Key

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

...

Note
titleWork in progress


Table of Contents

Prerequisites

  1. Agree Schema changes (ie. create proposal page for the required schema change e.g. with proposed yang file) 
    Example: CPS-677: Support 'public' Cm Handle Properties

Getting Started

The best way to start working with Liquibase change logs is to load the current CPS change logs into Postgress.

Build Docker for Postgres

Note

These steps are applied first to load the already existing change-logs within CPS. 

...

Code Block
languagebash
docker run --name postgres -p 5432:5432 -d -e POSTGRES_DB=cpsdb -e POSTGRES_USER=cps -e POSTGRES_PASSWORD=cps postgres:13.2-alpine

Applying Pending Changes

To apply any changes made to the changelog within CPS, run the following command from the cps-ri directory

Code Block
languagebash
mvn compile org.liquibase:liquibase-maven-plugin:4.3.1:update  -Dliquibase.url=jdbc:postgresql://localhost:5432/cpsdb  -Dliquibase.username=cps  -Dliquibase.password=cps  -Dliquibase.changeLogFile=src/main/resources/changelog/changelog-master.yaml

Change-Log Master Order

The change-log will then be updated running the following yaml files in order, based on the changelog-master.yaml file within the cps-ri->src->main->resources->changelog→db.changes directory. 

...