Schema and Data Modifications in Liquibase
Schema and Data Modifications in Liquibase
The following steps outline how to modify a database schema and data using Liquibase and a database extension.
- With an XML editor, open your core-changelog-ext.xml, located in extensions\database\ext-schema-client\src\main\resources\liquibase
- Add new changesets to suit the needs of your new object or project. For details on possible database modifications you can make using changesets, see the Liquibase Changeset Refactoring manual.
- Save the modified core-changelog-ext.xml.
- Commit the changesets in core-changelog-ext.xml to your database by running the following command in ext-schema-client:
mvn clean install liquibase:update
Warning:
Once a changeset has been committed, it must never be edited. Instead, commit additional changesets to counter-act your change.
Note: Populating an empty database with just the schema
You can use these steps to populate an empty database with just the database schema and no store data. However, if you intend to run the Commerce Engine web applications against your empty database, you'll need to set the COMMERCE/SYSTEM/ASSETS/assetLocation property, found in your database's tsettingdefinition table, to the absolute path where your Commerce Engine assets directory is located.