java-db-migration

Manages Spring Boot database migrations with Flyway or Liquibase scripts.

Updated Aug 22, 2026
One-click install
npx skills add https://github.com/shengmingzhishu/LeeCommonSkills --skill java-db-migration-shengmingzhishu
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: java-db-migration
Source: https://github.com/shengmingzhishu/LeeCommonSkills/tree/main/.rules-skills/java-stack/.trae/skills/java-db-migration
Command: npx skills add https://github.com/shengmingzhishu/LeeCommonSkills --skill java-db-migration-shengmingzhishu

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Schema and data changes in Spring Boot projects often break production when migrations are unordered, non-repeatable, or lack rollback plans. This Skill enforces a disciplined migration workflow covering versioning, compatibility, validation, and rollback strategy. ## Core Features & Use Cases - Versioned Migration Scripts: Creates repeatable, version-ordered Flyway or Liquibase migration scripts committed alongside Entity and query changes. - Compatibility & Rollback Planning: Handles legacy data compatibility, dual writes, gray releases, and defines rollback or forward-fix strategies for risky changes. - Pre-deployment Validation: Verifies migrations against temporary or Testcontainers databases, recording execution time, table-lock risk, and backup requirements. - Use Case: When adding a new column that requires backfilling historical data, use this Skill to generate the migration script, validate it in a Testcontainers database, and document the rollback plan before merging. ## Quick Start Ask the AI to create a Flyway migration for your Spring Boot schema change, including data backfill, compatibility handling, and a rollback plan validated against a test database.

Frequently Asked Questions about java-db-migration

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

FAQPage Schema
How do I write a Flyway migration in Spring Boot?▼

Create versioned SQL scripts in the Flyway migration directory with sequential version numbers, ensuring they are repeatable and ordered. Commit them together with the corresponding Entity and query changes so schema and code stay in sync.

Flyway vs Liquibase for Spring Boot database migrations?▼

Both are supported for managing table structures, data backfills, and rollbacks in Spring Boot. Flyway uses versioned SQL scripts while Liquibase uses declarative changelogs; choose based on your team's preference for SQL versus XML/YAML definitions.

How do I test database migrations before production deployment?▼

Run migrations against a temporary database or Testcontainers instance before deploying. Record execution time, table-lock risk, and backup requirements, and define a rollback or forward-fix strategy for each migration.

How do I handle data backfill during schema migration?▼

Treat any migration involving legacy data compatibility, dual writes, or gray releases as a high-risk change. Write the backfill as part of the versioned migration, validate it on a test database, and document the rollback or forward-fix plan.

When is a database migration considered high risk?▼

Migrations involving old data compatibility, dual writes, gray releases, or operations that are hard to roll back are classified as highest risk. These require extra validation, backup planning, and explicit rollback or forward-fix strategies before execution.