Package com.jalios.jcms.db.update
Class SchemaUpdater
java.lang.Object
com.jalios.jcms.db.update.SchemaUpdater
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionvoidDo schema update from sql files.get the current Core schema version from dBstatic SchemaUpdaterprotected static SchemaUpdatergetInstance(String coreBaseDir, String pluginsBaseDir, String scopeSuffix) To be only used by unit testgetPluginVersion(String pluginName) get the current plugin schema version from dB
-
Field Details
-
JALIOS_SQL_SEPARATOR
- See Also:
-
CORE_SCOPE
- See Also:
-
SCOPE_FIELD
- See Also:
-
VERSION_FIELD
- See Also:
-
-
Method Details
-
getInstance
-
getInstance
protected static SchemaUpdater getInstance(String coreBaseDir, String pluginsBaseDir, String scopeSuffix) To be only used by unit test -
getCoreVersion
get the current Core schema version from dB- Returns:
- the
SchemaVersion(null if not yet present in db)
-
getPluginVersion
get the current plugin schema version from dB- Parameters:
pluginName- the name of the plugin- Returns:
- the
SchemaVersion(null if not yet present in db)
-
doSchemaUpdate
Do schema update from sql files. each schema version are done in distinct transaction- Throws:
Exception- Exception thrown if an update cannot be done
-