You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 4 Next »

Work in progress


Prerequisites

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

Build Docker for Postgres

To start an Postgres database instance using docker issue the following command

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


Adding New Tables

To add new tables to tables within CPS using the Liquibase change-log go to the 01-createCPSTables.yaml within the cps-ri->src->main->resources->changelog→db.changes directory.

Under the databaseChangeLog object each change-set is defined with a unique id (Similar to how an array is defined within YAML).

Here the columns are also defined, along with the constraints of a specific column.

Anchor table example


To add a new table, under the latest change-set add a new change-set, incrementing the ID by one.


Define a changes object, all new edits will go under this section. Create a new createTable object, and under here the table name can be defined along with the column information/constraints as stated above.


Table once created within SqlDeveloper

Adding/Editing Columns



Insert Data

Adding New Yang Resource


Rollback


Applying Pending Changes

Potential Issues

  • No labels