Modifying Schema and Catalog Data
Modifying Schema and Catalog Data
The following steps outline how to modify the database schema and catalog data.
Schema Modifications
- In the extensions/database/ext-data/src/main/resources/schema module, open the schema-customizations-changelog.xml file.
- Add one or more changesets to schema-customizations-changelog.xml with the desired changes. For details on the possible database modifications you can make using changesets, see the Liquibase Changeset Refactoring manual.
- Run the Data Population tool to update the database as described in Populate_the_Database.html#Populate_the_Database.
Liquibase will fail if a previously processed changset is modified. Modifying changesets in development will force other developers to rebuild their database.
Once a changeset has been published to production, it must never be modified. Instead, commit additional changesets to counteract your change.
Data Modifications
When you're working on the initial implementation of a project, the catalog data you create will usually be used for testing or for deployment to all environments. All data should be added to the extensions/database/ext-data/src/main/resources/data/ directory. Test data should be added to the /test-data subdirectory. Data for all environments should be added to the /rel-1.0-data subdirectory.
The easiest ways to create catalog data are as follows:
- Use Commerce Manager to configure the catalog and export the changes using the Import/Export tool.
- Manually create the Import/Export XML files using the data in the commerce-data module as examples.
Then run the Data Population tool to update the database as described in Populate_the_Database.html#Populate_the_Database.
Unlike Liquibase changes sets which only process once, Import/Export change sets process every time the Data Population tool runs in your local development environment.
For more more information, see: