kora-database-migrationlisted
Install: claude install-skill kora-projects/kora-skills
# Kora Database Migration — Flyway and Liquibase
> **Kora sub-skill — obey the [kora-v1 meta rules](../../SKILL.md) on every task:** **R0** ensure `.kora-agent/` docs+examples are cloned · **R1** read this sub-skill before writing code · **R2** Kora APIs only — no Spring/Micronaut/Quarkus, no invented annotations or config keys · **R3** journal any incorrect Kora usage. Add comments/Javadoc only if asked.
Kora ships two optional modules that run database migrations during the
application's `Lifecycle` startup, on top of the JDBC datasource:
- **Flyway** — `FlywayJdbcDatabaseModule`, artifact `database-flyway`, config class `FlywayConfig`.
- **Liquibase** — `LiquibaseJdbcDatabaseModule`, artifact `database-liquibase`, config class `LiquibaseConfig`.
Both require the [JDBC module](../kora-database-jdbc/SKILL.md) (`database-jdbc`).
Migrations execute through a `Lifecycle` interceptor (`FlywayJdbcDatabaseInterceptor` /
`LiquibaseJdbcDatabaseInterceptor`) before dependent components are initialized.
> **Production note.** Kora's maintainers **do not recommend** running migrations
> from inside the application when the service scales horizontally — every replica
> and every restart would trigger a migration. Prefer the out-of-process strategy
> (Flyway Gradle plugin locally, K8s Job / CI in production). See
> [Out-of-process migrations](#out-of-process-migrations-recommended). The
> canonical `kora-java-crud` example wires only `JdbcDatabaseModule` and runs Flyway
> via the Gr