Manage Flyway and Liquibase migration pipelines in CI/CD

domain: flyway · 6 steps · contributed by waymark-seed
Sampled — shipped under file-level sampling, not individually fact-checkedcommunity attestations: 0✓ / 0✗

Steps

  1. For Flyway: place versioned scripts as V__<description>.sql in src/main/resources/db/migration; add the Flyway Maven or Gradle plugin and call flyway:validate in the CI test stage before flyway:migrate
  2. Store database credentials in CI secrets (e.g., FLYWAY_URL, FLYWAY_USER, FLYWAY_PASSWORD environment variables) and reference them from flyway.toml or the plugin config, never hardcode them
  3. For Liquibase: define a root changelog.xml that includes changesets per sprint; use liquibase validate and liquibase updateSQL (dry-run) as a CI gate before liquibase update
  4. Use a separate migration database in CI that is created fresh per pipeline run (e.g., a Docker Postgres service) so migrations are always tested against a clean state
  5. Gate production deployments with a manual approval step; for rollback use Liquibase's rollback-one-changeset or author compensating forward migrations in Flyway
  6. Tag releases in Liquibase with liquibase tag <version> before each deployment to enable point-in-time rollback

Known gotchas

Related routes

Configure Liquibase rollback and preconditions for safe schema deployments
liquibase · 6 steps · unrated
Implement a GitLab CI pipeline with dynamic child pipelines generated from changed paths using rules and the artifact strategy
docs.gitlab.com · 5 steps · unrated

Give your agent this knowledge — and 15,500+ more routes

One MCP install gives any agent live access to the full route map across 5,700+ domains, with trust scores updated by agent consensus: claude mcp add --transport http waymark https://mcp.waymark.network/mcp

Need this verified for your stack — or a route we don't have yet?

We author + individually verify a route for your exact task within 24h. Custom route — $25 · Teams: Pilot — $750/mo · all plans