Class AbstractSqlScriptBasedDbSchemaManager
java.lang.Object
org.flowable.common.engine.impl.db.AbstractSqlScriptBasedDbSchemaManager
- All Implemented Interfaces:
SchemaManager
- Direct Known Subclasses:
EngineSqlScriptBasedDbSchemaManager,ProcessDbSchemaManager,ServiceSqlScriptBasedDbSchemaManager
- Author:
- Joram Barrez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringaddSqlStatementPiece(String sqlStatement, String line) protected voiddbSchemaUpgrade(String component, int currentDatabaseVersionsIndex, String engineDbVersion) protected voiddbSchemaUpgradeUntil6120(String component, int currentDatabaseVersionsIndex, String dbVersion) voidexecuteMandatorySchemaResource(String operation, String component) voidexecuteSchemaResource(String operation, String component, String resourceName, boolean isOptional) protected voidexecuteSchemaResource(String operation, String component, String resourceName, InputStream inputStream) protected SchemaManagerDatabaseConfigurationgetProperty(String propertyName) getProperty(String propertyName, boolean checkPropertyTablePresent) protected StringgetResourceForDbOperation(String directory, String operation, String component, String databaseType) protected abstract Stringprotected booleanbooleanisTablePresent(String tableName) protected StringprependDatabaseTablePrefix(String tableName) protected StringreadNextTrimmedLine(BufferedReader reader) protected StringupdateDdlForMySqlVersionLowerThan56(String ddlStatements) MySQL is funny when it comes to timestamps and dates.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.flowable.common.engine.impl.db.SchemaManager
getContext, schemaCheckVersion, schemaCreate, schemaDrop, schemaUpdate, schemaUpdate
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
JDBC_METADATA_TABLE_TYPES
-
PROPERTY_TABLE
- See Also:
-
-
Constructor Details
-
AbstractSqlScriptBasedDbSchemaManager
public AbstractSqlScriptBasedDbSchemaManager()
-
-
Method Details
-
getDatabaseConfiguration
-
dbSchemaUpgradeUntil6120
-
dbSchemaUpgrade
-
isTablePresent
-
prependDatabaseTablePrefix
-
getProperty
-
getProperty
-
getPropertyTable
-
getResourceForDbOperation
-
getResourcesRootDirectory
-
executeMandatorySchemaResource
-
executeSchemaResource
-
executeSchemaResource
protected void executeSchemaResource(String operation, String component, String resourceName, InputStream inputStream) -
updateDdlForMySqlVersionLowerThan56
MySQL is funny when it comes to timestamps and dates. More specifically, for a DDL statement like 'MYCOLUMN timestamp(3)': - MySQL 5.6.4+ has support for timestamps/dates with millisecond (or smaller) precision. The DDL above works and the data in the table will have millisecond precision - MySQL before 5.5.3 allows the DDL statement, but ignores it. The DDL above works but the data won't have millisecond precision - MySQL 5.5.3 before [version] after 5.6.4 gives and exception when using the DDL above. Also, the 5.5 and 5.6 branches of MySQL are both actively developed and patched. Hence, when doing auto-upgrade/creation of the Flowable tables, the default MySQL DDL file is used and all timestamps/datetimes are converted to not use the millisecond precision by string replacement done in the method below. If using the DDL files directly (which is a sane choice in production env.), there is a distinction between MySQL version before 5.6. -
addSqlStatementPiece
-
readNextTrimmedLine
- Throws:
IOException
-
isMissingTablesException
-