schema-migration-planner
Skill18 starsChanged 9 months agoMITView on GitHub
Plan safe database schema evolution and zero-downtime change rollout for Kotlin plus Spring systems using Flyway, Liquibase, or equivalent migration tooling. Use when changing tables, columns, constraints, indexes, or data shape in systems with live traffic, rolling deploys, large datasets, or backward-compatibility requirements between old and new application versions.
1 other project uses a version of this, 1 of them edited.
Adopted by
Most recently taken up by
- JetBrains/skillsedited, first seen Apr 28, 2026
Other versions1 project uses a version of this.
Word for word · 0
None found.
Edited · 1
- JetBrains/skills★ 36097% same
Wrote their own version · 0
None found.
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository24 other files it gives its agents.
- ci-cd-containerization-advisorSkill
- configuration-properties-profiles-kotlin-safeSkill
- dependency-conflict-resolverSkill
- domain-decomposition-api-design-advisorSkill
- error-model-validation-architectSkill
- gradle-kotlin-dsl-doctorSkill
- integration-resilience-engineerSkill
- jackson-kotlin-serialization-specialistSkill
- java-kotlin-migration-assistantSkill
- jpa-spring-data-kotlin-mapperSkill
- kotlin-idiomatic-refactorer-spring-awareSkill
- kotlin-spring-proxy-compatibilitySkill
- observability-integratorSkill
- performance-concurrency-advisorSkill
- production-incident-responderSkill
- project-context-ingestionSkill
- spring-context-di-reasoningSkill
- spring-kotlin-code-reviewSkill
- spring-mvc-webflux-api-builderSkill
- spring-security-configurator-auditorSkill
- stacktrace-log-triageSkill
- test-suite-builderSkill
- transaction-consistency-designerSkill
- upgrade-breaking-change-navigatorSkill
The file
Show its rules and text
We split this skill into the rules it gives an agent
13 rules. About 0 are common, 13 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈13
Distinctive · estimate
This author's own choices. Worth a look.
0
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Distinctive: line 13
Treat schema evolution as a multi-step compatibility exercise, not a single DDL statement.
- Distinctive: line 41
Use explicit indexes and constraints as part of the migration design, not as an afterthought.
- Distinctive: line 42
Keep migration scripts deterministic and rerunnable according to the tool's expectations.
- Distinctive: line 73
Prefer roll-forward designs over rollback fantasies when data shape already changed in production.
- Distinctive: line 74
If the table is large or business-critical, separate compatibility change, data movement, and cleanup into different releases.
- Distinctive: line 75
If a migration changes query shape, validate execution plans as part of the migration, not only schema correctness.
- Distinctive: line 76
If zero downtime matters, prove compatibility between adjacent deploy versions explicitly.
- Distinctive: line 77
Treat cleanup as a separate project step with an explicit proof threshold, not a footnote in the initial rollout plan.
- Distinctive: line 79
If data correctness matters more than release speed, prefer longer coexistence windows over aggressive cleanup.
- Distinctive: line 95
Do not recommend direct destructive DDL on live systems without a phased plan.
- Distinctive: line 96
Do not assume rollback is safe once data has been transformed.
- Distinctive: line 97
Do not couple request latency to large backfills unless no other option exists.
- Distinctive: line 98
Do not edit historical applied migrations casually.
≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
Schema Migration Planner
Source mapping: Tier 3 specialized skill derived from Kotlin_Spring_Developer_Pipeline.md (SK-11).
Mission
Change schema without breaking live traffic, deployment order, or rollback safety. Treat schema evolution as a multi-step compatibility exercise, not a single DDL statement.
Read First
- Current schema and the desired target shape.
- Current code path, target code path, and deployment model.
- Table sizes, traffic pattern, lock sensitivity, and replication or CDC constraints.
- The actual migration tool and dialect in use.
- Backfill capability, rollout windows, and rollback expectations.
Planning Workflow
- Identify whether the change is additive, destructive, semantic, or data-moving.
- Determine whether old and new application versions must coexist.
- Plan the rollout in phases:
- expand
- dual write or compatibility layer
- backfill
- switch reads
- contract
- Decide whether rollback is realistic or whether roll-forward is the safer operational model.
- Define smoke checks, validation queries, and observability around the migration.
Core Migration Rules
- Add before remove.
- Make old code tolerate new schema before making new code require it.
- Backfill separately from latency-sensitive request paths whenever possible.
- Use explicit indexes and constraints as part of the migration design, not as an afterthought.
- Keep migration scripts deterministic and rerunnable according to the tool's expectations.
Advanced Migration Traps
- Adding a non-null column with a default may rewrite or lock a large table depending on database and version. Small DDL can still be operationally expensive.
- Unique constraints, index builds, and foreign-key validation can be more disruptive than column adds.
- Backfills can saturate replicas, queue workers, caches, and downstream CDC consumers even when primary write latency looks fine.
- Rolling deploys mean old and new code may both write for a while. Dual-write compatibility must be explicit.
- Renames are usually additive-copy-switch-drop plans in disguise. Treat them that way.
- Destructive clean-up should happen only after proving no old readers, writers, or reports still depend on the legacy shape.
- Trigger-based compatibility shims can help but add operational complexity and hidden coupling. Use them knowingly.
- Migration idempotency in tooling does not automatically mean business safety. Backfill scripts and data corrections need their own idempotency story.
Data Evolution Nuances
- Type changes such as numeric widening, timezone reinterpretation, enum reshaping, or JSON-structure evolution can be more dangerous than simple adds and drops.
NOT NULLand uniqueness enforcement often need a staged approach: detect violations, clean data, validate constraint, then enforce strictly.- Backfill chunk size, ordering, pause or resume semantics, and checkpointing are part of the migration design for large tables.
- Dual-read or shadow-read phases may be safer than immediate read switching when data transformation logic is non-trivial.
- Online schema change tools or shadow-table strategies may be necessary when ordinary DDL locking is too expensive for the workload.
- Replication lag and CDC downstream consumers can become the real bottleneck during backfill even when primary database metrics look acceptable.
Dialect And Tool Nuances
- Online index creation, concurrent index build, and lock behavior are vendor-specific. Plan by dialect, not by generic SQL intuition.
- Flyway and Liquibase have different strengths for rollback modeling, checksum handling, and branching workflows. Fit the plan to the tool already in use.
- Some schema tools treat checksum drift and edited history harshly. Never rewrite applied migrations casually.
- Partitioned tables, sharded systems, and CDC pipelines require migration plans that account for topology, not only DDL syntax.
Expert Heuristics
- Prefer roll-forward designs over rollback fantasies when data shape already changed in production.
- If the table is large or business-critical, separate compatibility change, data movement, and cleanup into different releases.
- If a migration changes query shape, validate execution plans as part of the migration, not only schema correctness.
- If zero downtime matters, prove compatibility between adjacent deploy versions explicitly.
- Treat cleanup as a separate project step with an explicit proof threshold, not a footnote in the initial rollout plan.
- Validate constraints against real production-shaped data before assuming the schema is enforceable.
- If data correctness matters more than release speed, prefer longer coexistence windows over aggressive cleanup.
- Make the migration observable: counters for rows backfilled, lag, retries, validation failures, and cutover readiness should exist before the dangerous step begins.
Output Contract
Return these sections:
Schema change type: additive, destructive, semantic, or data-moving.Phased migration plan: the exact expand/contract sequence.Compatibility story: how old and new code coexist safely.Operational risks: locks, backfill load, replication, CDC, or indexing risk.Verification: SQL checks, smoke checks, and rollout checkpoints.Cleanup phase: what can be removed later and under what proof.
Guardrails
- Do not recommend direct destructive DDL on live systems without a phased plan.
- Do not assume rollback is safe once data has been transformed.
- Do not couple request latency to large backfills unless no other option exists.
- Do not edit historical applied migrations casually.
Quality Bar
A good run of this skill gives the team a deployable, compatibility-safe migration sequence with operational awareness. A bad run writes correct SQL that is still dangerous to run on a live system.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

