This module provides an very thin layer to use Spring Boot’s integration with Flyway


Add the following dependency:


Also add the following module to your AppManifest:

public static class AppManifest {

Also configure Flyway connection parameters to use those of JDO JDO/DataNucleus object store:

If Flyway is enabled, then autoCreateAll should also be disabled:

Using in-memory object stores

When running with an in-memory object store - either for prototyping or integration tests - you will need the database tables to be created first.

In normal circumstances this is most easily peformed using with autoCreateAll enabled (and Flyway disabled). If you want your tests to check your Flyway scripts beforehand, there is nothing to prevent you from using Flyway all the time, even for integration tests.

One point to be aware of though is that the DDL syntax may vary between an in-memory database (such as H2) and a typical production database (such as PostgreSQL or SQL Server). Luckily, Spring Boot’s Flyway integration allows different variants of scripts for different vendors to be stored, in db.migration.{vendor} package (where {vendor} is as defined by the DatabaseDriver class). The simpleapp starter app also provides an example of this.

Custom schemas

In some circumstances DataNucleus — when running with autoCreateAll enabled — has been known to not create the prerequisite schema objects.

If this occurs, consider enabling Flyway for in-memory tests, and then use a custom value of spring.flyway.locations property to pick up the custom schema files:


This property could be configured for example using @TestPropertySource, or @ActiveProfile.