Agent skill

Flyway Migrations

by rrezartprebreza in rrezartprebreza/spring-boot-skills

A skill your agent uses when creating database migrations, schema changes, seed data, or any SQL that modifies database structure.

MITAuto-check passedDatabases

Install Flyway Migrations

skills CLI
$ npx skills add rrezartprebreza/spring-boot-skills --skill flyway-migrations -a claude-code

Project install by default; add -g for ~/.claude/skills/.

GitHub CLI
$ gh skill install rrezartprebreza/spring-boot-skills flyway-migrations --agent claude-code

Project scope by default; add --scope user for a personal install. Needs GitHub CLI 2.90.0 or later (public preview).

Manual copy
$ git clone --depth 1 https://github.com/rrezartprebreza/spring-boot-skills.git skills-src && mkdir -p .claude/skills && cp -r skills-src/skills/spring-boot-3/flyway-migrations .claude/skills/flyway-migrations && rm -rf skills-src

Use ~/.claude/skills/ instead of .claude/skills for a personal install. The folder must contain SKILL.md.

Claude Code skills documentation · loads skills from .claude/skills/

Facts

Skill name
flyway-migrations
GitHub stars
301
Token cost
~1.4k tokens
SKILL.md length
234 words
Files
6
Skills in repo
51
Repo updated
First seen
Licence
MIT

At a glance

A skill your agent uses when creating database migrations, schema changes, seed data, or any SQL that modifies database structure.

  • Creating database migrations
  • SKILL.md covers File Naming Convention, Example Migrations, Safe Migration Patterns and application.yml, plus 3 more sections
  • Runs Java scripts from its folder
  • Any SQL that modifies database structure

What it does

Flyway Migrations is an agent skill from rrezartprebreza/spring-boot-skills. Use when creating database migrations, schema changes, seed data, or any SQL that modifies database structure. Covers Flyway naming conventions, versioning, and safe migration patterns.

Its SKILL.md is about 1.4k tokens, which your agent loads only when the skill is triggered. The skill folder holds 8 other files (for example `agents/openai.yaml`).

It sits in Databases, covering Database migrations and Test data and fixtures. It works with SQL and Spring Boot. The repository describes itself as: Production-grade Claude Code and Codex skills for Spring Boot developers. The licence is MIT.

When your agent uses it

  • Creating database migrations
  • Any SQL that modifies database structure

Example prompts

  • “/flyway-migrations”

What it can do on your machine

Read from SKILL.md and the folder at commit f0c06a0. It shows what the files ask for, not the result of running them.

  • Tool permissions

    Pre-approves nothing: there is no allowed-tools line, so your agent's usual permission prompts apply.

    From allowed-tools in the SKILL.md frontmatter.

  • Runs code

    Ships script files (Java), which the agent can run.

    From the folder's file list and the shell code blocks in SKILL.md.

  • Network

    No URLs in SKILL.md.

    From URLs in SKILL.md, links to its own repository left out.

  • Credentials

    Names no API keys, tokens, secrets or passwords.

    From names ending in _API_KEY, _TOKEN, _SECRET, _KEY or _PASSWORD in SKILL.md.

Context cost

Flyway Migrations loads about 1.4k tokens when it runs. Until then it costs about 51 tokens; SKILL.md has 234 words of instructions outside code blocks.

Always · name and description, kept in context so the agent knows when to use it
~51
When it runs · the whole SKILL.md, loaded when a task matches
~1.4k

Estimates: characters ÷ 4, the usual rule of thumb; real counts depend on the model's tokenizer. Scripts and assets cost tokens only if the agent reads them.

Safety

Auto-check passed

The automated check found no risky patterns in SKILL.md.

Automated static check — not a guarantee. Review scripts before installing. It scans the text of SKILL.md for risky patterns (piping downloads into a shell, reading credential files, hidden Unicode, destructive commands); files beside SKILL.md are not scanned.

SKILL.md

The full file from rrezartprebreza/spring-boot-skills at commit f0c06a0, republished under its MIT licence (© rrezartprebreza). 234 words, ~1,420 tokens.

Download SKILL.mdSave it as .claude/skills/flyway-migrations/SKILL.md (or your agent's skills folder). This skill also uses 5 other files; get the full folder from GitHub.
name
flyway-migrations
description
Use when creating database migrations, schema changes, seed data, or any SQL that modifies database structure. Covers Flyway naming conventions, versioning, and safe migration patterns.

Flyway Migrations

File Naming Convention

src/main/resources/db/migration/

V{version}__{description}.sql       ← versioned (run once)
R__{description}.sql                ← repeatable (run when checksum changes)
U{version}__{description}.sql       ← undo (requires Flyway Teams)

Examples:
V1__create_users_table.sql
V2__create_orders_table.sql
V2.1__add_order_status_index.sql
V3__add_customer_email_to_orders.sql
R__create_reporting_views.sql

Rules:

  • Double underscore __ between version and description
  • Underscore _ for spaces in description
  • Sequential versions — never go back and fill gaps
  • Never modify a migration that has already run in any environment

Example Migrations

sql
-- V1__create_users_table.sql
CREATE TABLE users (
    id          UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    email       VARCHAR(255) NOT NULL UNIQUE,
    password    VARCHAR(255) NOT NULL,
    role        VARCHAR(50)  NOT NULL DEFAULT 'USER',
    created_at  TIMESTAMPTZ  NOT NULL DEFAULT NOW(),
    updated_at  TIMESTAMPTZ  NOT NULL DEFAULT NOW()
);

CREATE INDEX idx_users_email ON users(email);

-- V2__create_orders_table.sql
CREATE TABLE orders (
    id              UUID PRIMARY KEY DEFAULT gen_random_uuid(),
    user_id         UUID NOT NULL REFERENCES users(id),
    status          VARCHAR(50) NOT NULL DEFAULT 'PENDING',
    total_amount    NUMERIC(12, 2) NOT NULL DEFAULT 0,
    created_at      TIMESTAMPTZ NOT NULL DEFAULT NOW(),
    updated_at      TIMESTAMPTZ NOT NULL DEFAULT NOW()
);

CREATE INDEX idx_orders_user_id  ON orders(user_id);
CREATE INDEX idx_orders_status   ON orders(status);
CREATE INDEX idx_orders_created  ON orders(created_at DESC);

-- V3__add_shipping_address_to_orders.sql
-- Adding a column — always nullable or with default (safe for existing rows)
ALTER TABLE orders
    ADD COLUMN shipping_address TEXT,
    ADD COLUMN shipped_at TIMESTAMPTZ;

Safe Migration Patterns

sql
-- ✅ Safe: add nullable column
ALTER TABLE orders ADD COLUMN notes TEXT;

-- ✅ Safe: add column with default
ALTER TABLE orders ADD COLUMN priority INT NOT NULL DEFAULT 0;

-- ✅ Safe: add index CONCURRENTLY (no table lock in Postgres)
-- ⚠️ BUT: CONCURRENTLY cannot run inside a transaction, and Flyway wraps every
-- migration in one by default → the migration FAILS. Opt that one script out
-- with a sidecar config file:
--   V4__add_orders_email_index.sql.conf  →  executeInTransaction=false
-- Keep the CONCURRENTLY statement alone in its own migration file.
CREATE INDEX CONCURRENTLY idx_orders_email ON orders(customer_email);

-- ✅ Safe: rename via add + backfill + drop (multi-step)
-- Step 1 (V5): add new column
ALTER TABLE orders ADD COLUMN customer_email VARCHAR(255);
-- Step 2 (V5): backfill
UPDATE orders SET customer_email = (SELECT email FROM users WHERE users.id = orders.user_id);
-- Step 3 (V5): add constraint after data is there
ALTER TABLE orders ALTER COLUMN customer_email SET NOT NULL;
-- Step 4 (later V6, after code is deployed): drop old column
ALTER TABLE orders DROP COLUMN user_id;

-- ❌ Dangerous: rename column directly (breaks running app)
ALTER TABLE orders RENAME COLUMN user_id TO customer_id;

-- ❌ Dangerous: NOT NULL without default on large table (locks table)
ALTER TABLE orders ADD COLUMN priority INT NOT NULL; -- will fail on existing rows

application.yml

yaml
spring:
  flyway:
    enabled: true
    locations: classpath:db/migration
    baseline-on-migrate: true   # for existing databases
    validate-on-migrate: true
    out-of-order: false         # enforce sequential execution

Seed Data (test/dev only)

java
// Use Spring profiles, not Flyway, for seed data
@Component
@Profile("dev")
@RequiredArgsConstructor
public class DevDataSeeder implements ApplicationRunner {
    private final UserRepository userRepository;

    @Override
    public void run(ApplicationArguments args) {
        if (userRepository.count() == 0) {
            userRepository.save(User.createAdmin("admin@dev.local", "password123"));
        }
    }
}

Team Workflow: Concurrent Migrations

  • Multiple developers creating migrations simultaneously will cause version conflicts
  • Solution: use a shared tracker (Slack channel, wiki page) or timestamp-based versions (V20260414_1__)
  • If two migrations target the same version, one developer must bump theirs
  • Run flyway info before committing to check for version gaps or duplicates
  • In CI/CD: run flyway validate as a pre-deploy step to catch conflicts early
  • Never set out-of-order: true in production — it masks migration ordering bugs

Gotchas

  • Agent names files V1_create_users.sql (single underscore) — must be double __
  • Agent modifies existing migration files — never edit a migration that has run
  • Agent adds NOT NULL column without default — use nullable or provide default
  • Agent renames columns directly — use multi-step add/backfill/drop across deploys
  • Agent seeds data in Flyway migrations — use @Profile("dev") seeders instead
  • Agent uses CREATE INDEX CONCURRENTLY in a normal migration — fails inside Flyway's transaction; needs executeInTransaction=false in a .sql.conf sidecar and its own file
  • Agent skips indexes — always index foreign keys and columns used in WHERE/ORDER BY
  • Agent creates migration with DROP TABLE or DROP COLUMN as first step — always add new column, deploy code, then drop old in a later migration

© rrezartprebreza, MIT. Rendered from Markdown: HTML in the file is shown as text, images as links, and headings moved down two levels. Raw file

Files

SKILL.md and 5 other files in skills/spring-boot-3/flyway-migrations of rrezartprebreza/spring-boot-skills.

  • SKILL.md
  • agents/openai.yaml
  • examples/bad-migration.sql
  • examples/good-migration.sql
  • templates/DevDataSeeder.java
  • templates/V1__create_table_template.sql

Open the folder on GitHubat commit f0c06a0

Compare with similar skills

Flyway Migrations next to the 5 skills that share the most tags, products or categories with it. Stars are the repository's; “used in” counts other GitHub owners with a copy.

Flyway Migrations compared with similar skills
SkillStarsUsed inTokensAuto-checkLicenceRepo updated
Flyway Migrations this skillrrezartprebreza/spring-boot-skills301—~1.4kAutomated safety check: PassMIT
Crudwujun728/jun_java_plugin239—~2.8kAutomated safety check: PassNone
313 Frameworks Spring DB Migrations Flywayjabrena/plinth447—~1.1kAutomated safety check: PassApache-2.0
Eng Schema Migrationcompozy/compozy2.8k—~763Automated safety check: PassMIT
Django Filter Benchmarksaleor/saleor23k—~2.3kAutomated safety check: PassBSD-3-Clause
Evolving The Data ModelTriliumNext/Trilium38k—~2.1kAutomated safety check: PassAGPL-3.0

Similar skills

  • Crud

    wujun728/jun_java_plugin

    一键生成完整业务模块代码(SQL/Entity/DAO/XML/Repository/Service/Controller/Mapper/POJO),用于创建新的业务功能

    239 GitHub stars~2.8k tokensUpdated 4 mo ago
    DatabasesAuto-check passed
  • A skill your agent uses when you need to add or review Flyway database migrations in a Spring Boot application — Maven dependencies, db/migration scripts, spring.flyway.

    447 GitHub stars~1.1k tokensUpdated 4 days ago
    DatabasesAuto-check passed
  • Eng Schema Migration

    compozy/compozy

    Change Compozy SQLite tables, columns, indexes, constraints, triggers, or seed data under internal/store using append-only Goose migrations and owning generators.

    2.8k GitHub stars~763 tokensUpdated yesterday
    DatabasesAuto-check passed
  • Benchmarks Django ORM filters in Saleor by generating bulk data, extracting the SQL and running EXPLAIN ANALYZE to check index usage.

    23k GitHub stars~2.3k tokensUpdated 2 days ago
    DatabasesAuto-check passed
  • Evolving The Data Model

    TriliumNext/Trilium

    A skill your agent uses when adding a DB migration or a new column/field to a Becca entity in Trilium ("add a migration", "new column on notes/attributes", "ALTER TABLE", "add a field to…

    38k GitHub stars~2.1k tokensUpdated today
    DatabasesAuto-check passed
  • Wtf

    noobnooc/agent

    Pre-launch and pre-commit audit for vibe coding projects. An agent skill from noobnooc/agent.

    1.4k GitHub stars~2.1k tokensUpdated 1 mo ago
    DatabasesAuto-check: notes

More from rrezartprebreza/spring-boot-skills

All 51 skills in this repo
  • AI Observability

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when adding Spring AI-specific model observations, token usage, latency, externally configured cost attribution, advisor telemetry, or protected prompt and completion logging.

    301 GitHub stars~1.6k tokensUpdated 20 days ago
    Auto-check passed
  • API Versioning

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when versioning Spring MVC or WebFlux APIs in Spring Boot 3 / Spring Framework 6.

    301 GitHub stars~516 tokensUpdated 20 days ago
    Auto-check passed
  • API Versioning

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when versioning Spring MVC or WebFlux APIs in Spring Boot 4 / Spring Framework 7.

    301 GitHub stars~643 tokensUpdated 20 days ago
    Auto-check passed
  • Container Native Deployment

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when packaging a Spring Boot 3 application as an OCI image or GraalVM native executable.

    301 GitHub stars~781 tokensUpdated 20 days ago
    Auto-check passed
  • Container Native Deployment

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when packaging Spring Boot 4 as an OCI image, JVM container, AOT application, or GraalVM native executable.

    301 GitHub stars~706 tokensUpdated 20 days ago
    Auto-check passed
  • Domain Driven Design

    rrezartprebreza/spring-boot-skills

    A skill your agent uses when evolving aggregate invariants, value objects or domain events in an existing DDD-style Spring Boot 3 application, or when DDD is explicitly requested.

    301 GitHub stars~2.1k tokensUpdated 20 days ago
    Auto-check passed

Works with

Categories

Questions about Flyway Migrations

What does Flyway Migrations do?

A skill your agent uses when creating database migrations, schema changes, seed data, or any SQL that modifies database structure. Flyway Migrations is an agent skill from rrezartprebreza/spring-boot-skills. Use when creating database migrations, schema changes, seed data, or any SQL that modifies database structure.

When should I use Flyway Migrations?

Flyway Migrations fits situations like: creating database migrations; any SQL that modifies database structure.

How do I install Flyway Migrations in Claude Code?

Run `npx skills add rrezartprebreza/spring-boot-skills --skill flyway-migrations -a claude-code`. Or copy the skill folder (skills/spring-boot-3/flyway-migrations in rrezartprebreza/spring-boot-skills) into .claude/skills/flyway-migrations in your project. Claude Code loads it when a task matches its description.

How do I install Flyway Migrations in Codex?

Run `npx skills add rrezartprebreza/spring-boot-skills --skill flyway-migrations -a codex`. Or copy the skill folder (skills/spring-boot-3/flyway-migrations in rrezartprebreza/spring-boot-skills) into .agents/skills/flyway-migrations in your project. Codex loads it when a task matches its description.

Can I use Flyway Migrations in Cursor, Gemini CLI or GitHub Copilot?

Cursor, Gemini CLI, GitHub Copilot and OpenCode also load SKILL.md folders. With the skills CLI, run `npx skills add rrezartprebreza/spring-boot-skills --skill flyway-migrations -a cursor` (or -a gemini-cli, github-copilot or opencode for the others). To copy it by hand, put the folder in .cursor/skills/flyway-migrations, .gemini/skills/flyway-migrations, .github/skills/flyway-migrations and .opencode/skills/flyway-migrations in your project.

What does Flyway Migrations need to run?

Going by SKILL.md and its folder, Flyway Migrations needs Java for the scripts in its folder.

Does Flyway Migrations access the network?

SKILL.md contains no URLs. Any network use would come from the scripts or tools the agent runs. This is read from the text; nothing was executed.

Is Flyway Migrations safe to install?

Our automated static check of SKILL.md found no risky patterns, such as piping downloads into a shell, reading credential files or hidden Unicode. It is not a guarantee. Review the folder before installing.

What licence does Flyway Migrations use?

Flyway Migrations is published under the MIT licence (the repository's licence). It allows redistribution, so the full SKILL.md is shown on this page.

How many tokens does Flyway Migrations use?

About 1.4k tokens (SKILL.md is roughly 5.7k characters). Agents keep only the skill's name and description in context until a task matches; then they load SKILL.md in full.

What are the alternatives to Flyway Migrations?

Skills that share tags, products or a category with Flyway Migrations: Crud (wujun728/jun_java_plugin, 239 stars), 313 Frameworks Spring DB Migrations Flyway (jabrena/plinth, 447 stars), Eng Schema Migration (compozy/compozy, 2.8k stars) and Django Filter Benchmark (saleor/saleor, 23k stars). The comparison table on this page puts their stars, adoption, token cost, safety result and licence side by side.

Who maintains Flyway Migrations?

rrezartprebreza (a GitHub user) maintains it in rrezartprebreza/spring-boot-skills, which has 301 GitHub stars. The repository holds 51 skills in this directory. The repository was last updated on September 21, 2026.

Source: rrezartprebreza/spring-boot-skills on GitHub. Facts on this page come from the repository at the commit we read; the author's words are quoted as theirs.