Migration from v1.7 to v1.8
Overview
Version 1.8 replaces Hibernate auto schema management
(ddl-auto=update) with Flyway as the sole
mechanism for database schema changes. From this version onwards, all DDL
changes are versioned, tracked and repeatable across every supported database
engine (MariaDB, MySQL, PostgreSQL, Oracle, SQL Server).
Migration steps for existing v1.7 installations
- Download OKMFlow 1.8 from https://download.openkm.com/pro/tools.
- Stop Tomcat and replace the okmflow.war archive.
-
Edit $TOMCAT_HOME/okmflow.properties and apply the following changes:
-
Set
spring.jpa.hibernate.ddl-autotovalidate. Hibernate will only verify the schema against the entities; Flyway is now responsible for all DDL changes:spring.jpa.hibernate.ddl-auto=validate -
Add the two Flyway baseline properties. These tell Flyway that the existing
schema already corresponds to the v1.7 baseline and that it should only apply
migrations above that version:
spring.flyway.baseline-on-migrate=true spring.flyway.baseline-version=1.7.0.0These lines are automatically removed by the application on the first successful startup. No manual cleanup is needed.
-
Set
-
Start Tomcat. On the first startup, Flyway will:
- Create the
WF_SCHEMA_HISTORYtracking table. - Record the v1.7 baseline as already applied.
- Apply all pending migrations above v1.7.
- Create the
- Verify the application started correctly. The baseline properties added in step 3 have been automatically removed from okmflow.properties.
Fresh installations
New installations do not require the baseline properties. Flyway detects an empty database and applies all migrations in order.
Migrations to v1.9
See Migration from v1.8 to v1.9 for the steps required to upgrade an existing v1.8 installation to v1.9.