As you develop modules, you might need to iterate through several database schema changes. Before you release new module versions with your finalized schema changes, you must create a formal data upgrade process. Until then, you can use the Build Auto Upgrade feature to test schema changes on the fly.
Setting the global property
module schema changes for redeployed modules whose service build numbers have
build.number property in the module’s
file indicates the service build number. Build Auto Upgrade executes schema
changes without massaging existing data. It leaves data empty for created
columns, drops data from deleted and renamed columns, and orphans data from
deleted and renamed tables.
Although Build Auto Upgrade updates databases quickly and automatically, it doesn’t guarantee a proper data upgrade–you implement that via data upgrade processes. Build Auto Upgrade is for development purposes only.
schema.module.build.auto.upgrade is set to
false. On any
module’s first deployment, the module’s tables are generated regardless of the
The following table summarizes Build Auto Upgrade’s handling of schema changes:
|Add column||Create a new empty column.|
|Rename column||Drop the existing column and delete all its data. Create a new empty column.|
|Delete column||Drop the existing column and delete all its data.|
|Create or rename a table in Liferay DXP’s built-in data source.||Orphan the existing table and all its data. Create the new table.|
Great! Now you know how to use the Build Auto Upgrade developer feature.