SchemaUpdate
Here we describe how the database schema is updated on the machines the
Chimera engine is running on, whenever the schema changes in the code
base. The update process is controlled by the file schemaversion
and
the database table version.
When the Chimera engine starts, the
Connection class compares the version in the file to the one found in
the database. If the version in the file is higher, the database is
"updated", by first dropping the existing schema and loading the new one
from the SQL script.
The pom file has property schema.version
, that is used to write the
current schema version in a file called 'schemaversion' (using maven
filtering). This property needs to be increased, whenever the schema
has changed, i.e. the SQL script changed.
The SQL script now uses a placeholder for the schema name that is set by maven. The value should be set in a profile when building with Jenkins. The default value 'JEngineV2' is defined as property in the pom file.