Skip to content

DB Schema migration ideas

Emmanuel Bernard edited this page Jun 4, 2019 · 1 revision

This document is based on notes from Emmanuel

Here I discuss flyway but any DB migration tool should be somewhat similar.

In dev mode, Hibernate ORM’s schema drop-create or update is acceptable as long as before committing or before going to staging, a schema migration is defined by tools like flyway.

→ offer option to disable / enable flyway based on a property. Should it be tied to quarkus.hibernate-orm.database.generation? I.e not allow both together or have quarkus.hibernate-orm.database.generation offer flyway as an option? If flyway is activate, Hibernate ORM should validate the schema: this will avoid a JPA schema being out of sync with Flyway.

Maybe something more advance would be to propose the Vn+1 migration file based on update? Offer a way to create the first schema file for flyway (some profile mode of sort).

Should the DB migration extensions offer a command line tool to run DB migrations separate from the application start/stop lifecycle? ./bin/flyway migrate reusing the application configuration

Current Version

Migration Guide 3.16

Next Version

Migration Guide 3.17

Clone this wiki locally