.. ******************************************************************************* * MetaFactory.io R2 * Technical Documentation * * File name : Liquibase.rst * Created by : Ralph Oudejans * Last update : 02-03-2021 * Updated by : Niels de Nies * * MetaFactory BV Amsterdam ******************************************************************************* .. include:: ../../external-links.txt Liquibase ========= Purpose ------- `Liquibase` is used to manage database schema changes. Website ------- https://www.liquibase.org/ Buildsets involved ------------------ - liquibase_changesets By running this build set the MetaFactory tool will generate Liquibase change sets in directory [*project*]\\[*backend*]\\src\\main\\resources\\liquibase. Usage ----- At MetaFactory database schema changes are **manually** placed in a specific file called: [*project*]\\[*backend*]\\src\\main\\resources\\config\\liquibase\\liquibase-alters-changeLog.xml Whenever the backend is started, any changes that have not been applied yet to the database will be made by Liquibase. .. important:: The `Liquibase alters changelog liquibase-alters-changeLog.xml` is a **hand-written** file. The MetaFactory tool does generate Liquibase change sets, but these change sets are not incremental change sets. To make sure the change sets are incremental, the content of these generated change sets have to manually copied or converted into the liquibase-alters-changeLog.xml file. For more information about Liquibase see the Liquibase-Homepage_. .. note:: Each change set in `liquibase-alters-changeLog.xml` has an id. This id is based upon a Jira issue. .. warning:: **Never change an existing changeSet in `liquibase-alters-changeLog.xml`** as this will prevent the backend application from starting!