- Java 98.7%
- Shell 1.3%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
| .mvn/wrapper | ||
| .run | ||
| docs | ||
| jeap-spring-boot-db-migration-starter | ||
| jeap-spring-boot-db-migration-starter-it | ||
| .gitignore | ||
| AGENTS.md | ||
| CHANGELOG.md | ||
| CONTRIBUTING.md | ||
| exclude-patterns.txt | ||
| LICENSE | ||
| mvnw | ||
| pom.xml | ||
| publiccode.yml | ||
| README.md | ||
| SECURITY.md | ||
| setPomVersions.sh | ||
| THIRD-PARTY-LICENSES.md | ||
jEAP Spring Boot DB Migration Starter
jEAP Spring Boot DB Migration Starter is a Spring Boot starter that runs Flyway database migrations in jEAP services with a PostgreSQL focus. On Kubernetes-based platforms it lets the schema migration run as a dedicated job (init container) that completes before the application pods start, so the database is ready before the service goes live. For local development it falls back to the familiar migrate-on-startup behaviour. Adding the starter and a few properties is enough — it auto-configures a custom Flyway migration strategy. It provides:
- A custom
FlywayMigrationStrategythat picks the right behaviour for the current platform - Init-container mode: migrate, then terminate the pod with the migration result as exit code
- Application-container mode: verify the migration was already applied, otherwise refuse to start
- Startup-migrate mode: classic migrate-on-startup, used automatically outside Kubernetes
- Configuration via the
database-migration.*properties, on top of the standardspring.flyway.*properties
Documentation
Start with Getting started, then follow the links below.
| Topic | File |
|---|---|
| Getting started (add the dependency, configure) | docs/getting-started.md |
| Migration modes & strategy resolution | docs/migration-modes.md |
Configuration reference (database-migration.*) |
docs/configuration.md |
| Kubernetes deployment & the migration job | docs/kubernetes-deployment.md |
Changes
This library is versioned using Semantic Versioning and all changes are documented in CHANGELOG.md following the format defined in Keep a Changelog.
Note
This repository is part the open source distribution of jEAP. See github.com/jeap-admin-ch/jeap for more information.
License
This repository is Open Source Software licensed under the Apache License 2.0.