Skip to content
Back to skills

Migration Immutability

ASecurity

Determine whether an existing migration can change and implement corrective migrations safely.

  • 56 stars
  • 0 votes
  • 0 copies
  • 4 views
  • Added May 26, 2026
databasesgo

Security analysis

A100/100

Scanned October 7, 2026

npx -y skills add block/proto-fleet --skill migration-immutability --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Migration Immutability?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Migration Immutability
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/block-migration-immutability/badge)](https://www.skillsdirectory.com/skills/block-migration-immutability)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: migration-immutability
description: Determine whether an existing migration can change and implement corrective migrations safely.
---

# Migration immutability

Applied migrations cannot be rewritten: golang-migrate skips applied versions.
Treat migrations merged to main as immutable, even when deployment status is
unknown. Check the creation commit's reachability from `origin/main` (or
`main` when unavailable), not merely whether the file has local commit history.
Merged history is a conservative boundary, not proof of deployment. Missing
or shallow history is inconclusive; resolve it before declaring a file editable.

A new, unmerged migration can be revised in its feature branch unless it is
known to have been deployed. Do not delete or renumber immutable migrations.

For an immutable migration, implement the requested correction in a new pair
using `cd server && just db-migration-new <name>`. Include both up and down
files and follow the [generation skill](../code-generation/SKILL.md) to select
and run the root generation command after schema/query changes. This is the
normal way to complete a schema fix, not a reason to stop at proposing one.

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.