Class AbstractSqlScriptBasedDbSchemaManager
java.lang.Object
org.flowable.common.engine.impl.db.AbstractSqlScriptBasedDbSchemaManager
- All Implemented Interfaces:
SchemaManager
- Direct Known Subclasses:
ProcessDbSchemaManager
,ServiceSqlScriptBasedDbSchemaManager
- Author:
- Joram Barrez
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected String
addSqlStatementPiece
(String sqlStatement, String line) protected void
dbSchemaUpgrade
(String component, int currentDatabaseVersionsIndex, String engineDbVersion) protected void
dbSchemaUpgradeUntil6120
(String component, int currentDatabaseVersionsIndex, String dbVersion) void
executeMandatorySchemaResource
(String operation, String component) void
executeSchemaResource
(String operation, String component, String resourceName, boolean isOptional) protected void
executeSchemaResource
(String operation, String component, String resourceName, InputStream inputStream) getProperty
(String propertyName) protected String
getResourceForDbOperation
(String directory, String operation, String component, String databaseType) protected abstract String
boolean
isTablePresent
(String tableName) protected String
prependDatabaseTablePrefix
(String tableName) protected String
readNextTrimmedLine
(BufferedReader reader) protected String
updateDdlForMySqlVersionLowerThan56
(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, wait
Methods inherited from interface org.flowable.common.engine.impl.db.SchemaManager
schemaCheckVersion, schemaCreate, schemaDrop, schemaUpdate, schemaUpdate
-
Field Details
-
logger
protected final org.slf4j.Logger logger -
JDBC_METADATA_TABLE_TYPES
-
PROPERTY_TABLE
- See Also:
-
SCHEMA_VERSION_PROPERTY
- See Also:
-
-
Constructor Details
-
AbstractSqlScriptBasedDbSchemaManager
public AbstractSqlScriptBasedDbSchemaManager()
-
-
Method Details
-
dbSchemaUpgradeUntil6120
-
dbSchemaUpgrade
-
isTablePresent
-
prependDatabaseTablePrefix
-
getDbSqlSession
-
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
-