flyway

Manage database schema changes through versioned Flyway migrations.

Updated Aug 23, 2026
One-click install
npx skills add https://github.com/GreenFirst-kr/green_first_be --skill flyway
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: flyway
Source: https://github.com/GreenFirst-kr/green_first_be/tree/main/.claude/skills/flyway
Command: npx skills add https://github.com/GreenFirst-kr/green_first_be --skill flyway

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This skill enforces a disciplined approach to database schema changes by ensuring all modifications are tracked as Flyway migrations, preventing edits to already-applied migrations, and preserving reproducible environments through ddl-auto=validate.

Core Features & Use Cases

  • Enforces migration discipline by requiring new migrations for every change instead of modifying existing files.
  • Maintains strict schema governance with ddl-auto=validate to guarantee consistent, repeatable deployments across environments.
  • Provides safe backfill guidance for NOT NULL changes and clearly documents repair workflows for development and testing.
  • Documents end-to-end migration workflow: scope identification, creation of new migrations, backfill planning, and validation before deployment.

Quick Start

Create a new SQL migration under src/main/resources/db/migration and run your build or tests to validate the migration against the configured Flyway rules.

Frequently Asked Questions about flyway

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I manage database schema changes with versioned Flyway migrations?

To manage schema changes, create a new SQL migration under src/main/resources/db/migration and run your build or tests. This validates the migration against configured Flyway rules and ensures consistent, repeatable deployments.

Why does Flyway validation fail on checksum mismatches and how do I fix it?

Flyway validation fails on checksum mismatches when an already-applied migration file is modified. You can fix this by following profile-scoped auto-repair rules or creating a new migration file instead of editing existing ones.

What is the safe backfill pattern for NOT NULL columns in Flyway?

The safe backfill pattern for NOT NULL columns requires documenting a multi-step migration process to populate existing rows before applying the NOT NULL constraint, ensuring no data is lost during schema updates.

Do I need to set ddl-auto to validate when using Flyway for database migrations?

Yes, you need to set ddl-auto=validate to maintain strict schema governance. This guarantees consistent, repeatable deployments across environments by ensuring Hibernate validates the schema without applying automated changes.

Can I edit an existing Flyway migration file after it has been applied to a database?

No, Flyway enforces immutable migrations to prevent editing applied files. You must create a new migration for every schema change to maintain auditable, reproducible environments and avoid validation failures.

How do I set up a baseline migration for a clean database environment?

To set up a baseline migration for a clean environment, configure Flyway to establish a baseline version, allowing new migrations to apply sequentially while maintaining strict migration discipline across the database.