Deprecated
This page is deprecated and may contain information that is no longer up to date.
Introduction¶
Warning
This documentation is addressed to developers who are creating a new schema version. It is not intended for operators.
This section explains how to create a new version of the CTA Catalogue schema, which involves the following steps:
- Creating a new version of the schema
- Modifying the schema, following the naming conventions
- Creating and testing the upgrade/migration scripts
- Pushing these modifications to the CTA repository
Usually a partial or failed upgrade can be rolled back, though this is not possible in all cases.
Summary of the steps¶
Warning
Whenever you make any change to the CTA schema, you must create and test the corresponding Liquibase upgrade script. Schema changes should only be merged to master when the tests pass.
Follow these steps to do a schema update:
- Install
cta-catalogue-schema-verify
and Liquibase - Identify the changes that have been made to the schema: are they backward-compatible or backward-incompatible?
- Create the Liquibase migration/upgrade changelog file. These are basically SQL scripts.
- Test the Liquibase upgrade scripts and the full upgrade of CTA on a CTA test environment
- When the tests pass, you can push your changes to CTA master