Announcement: You can find the guides for Commerce 7.5 and later on the new Elastic Path Documentation site. The Developer Center continues to support Commerce 6.13.0 through 7.4.1.Visit new site

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

  1. In the extensions/database/ext-data/src/main/resources/schema module, open the schema-customizations-changelog.xml file.
  2. Add one or more change sets to schema-customizations-changelog.xml with the desired changes. For details on the possible database modifications you can make using change sets, see the Liquibase Changeset Refactoring manual.
  3. Run the Data Population tool to update the database.
Warning:

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.

Tip: Re-running Import/Export change sets

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 information, see: