Sometimes, the database schema must be “manually” updated to add new primary columns to the users
table, to add columns to table attributes' underlying tables, to resize existing columns or the like.
Generally it is not advisable to actually do this by hand as this can be an error-prone task that needs to be performed individually for each deployment.
Every UM plugin has its own database schema level counter that implicitly starts at “0”. (The value of this counter is internally kept in the database and managed by the CSE class PluginSchemaMigration
).
To implement a schema level update, two steps must be taken:
The new numeric schema level must be specified in the plugin’s descriptor file.
The actual schema level update must be implemented.
Define new schema level in plugin descriptor
If your plugin descriptor file does not already contain it, add a new property named dbSchema
and give it the value 1
. If your plugin descriptor file already contains the dbSchema
property, just increase its value by 1.
Your plugin.desc.json
should look like this:
{ "$schema": "http://git.intra.pinuts.de/cmsbs/cmsbs/raw/master/doc/json-schemas/plugin.desc.json", "__encoding": "Pinuts File Encoding: UTF-8", ..., "dbSchema": 1 }