migration-review
Skill207 starsChanged 2 months agoMITView on GitHub
SQLite migration assessment for items with the needs-migration-review trait. Evaluates schema changes, table recreation patterns, data migration strategy, and Flyway migration correctness. Invoked via skillPointer when filling migration-assessment notes.
In this repository12 other files it gives its agents.
- CLAUDE.mdCLAUDE.md
- claude-plugins/CLAUDE.mdCLAUDE.md
- add-componentSkill
- api-compat-reviewSkill
- feature-implementationSkill
- implementSkill
- perf-reviewSkill
- plugin-impact-reviewSkill
- prepare-releaseSkill
- review-qualitySkill
- spec-qualitySkill
- test-authorSkill
The file
We split this skill into the rules it gives an agent
3 rules. About 0 are common, 3 are distinctive, and 0 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈3
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
Read the changed files and migration SQL to determine:
- Distinctive: line 16
Create new table with desired schema
- Distinctive: line 25
Verify against known SQLite limitations:
≈ “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
Migration Review Framework
Evaluate database migration safety for SQLite-specific constraints. This project uses Flyway migrations with SQLite, which has significant limitations compared to PostgreSQL/MySQL.
Step 1: Identify Schema Changes
Read the changed files and migration SQL to determine:
- New columns —
ALTER TABLE ADD COLUMNworks in SQLite - Modified columns — SQLite has NO
ALTER COLUMN. Requires table recreation:- Create new table with desired schema
- Copy data from old table
- Drop old table
- Rename new table
- New tables — check foreign key ordering in
DirectDatabaseSchemaManager - Index changes —
CREATE INDEX/DROP INDEXwork normally
Step 2: SQLite Constraint Check
Verify against known SQLite limitations:
- No
ALTER COLUMN— if modifying existing columns, table recreation pattern is used - No
DROP COLUMNin older SQLite versions — check if the Docker image's SQLite supports it - Foreign key constraints — new tables must be inserted in correct order in
DirectDatabaseSchemaManager TEXTaffinity — SQLite stores all strings as TEXT regardless of declared type- No concurrent write transactions — migrations must be sequential
Step 3: Data Migration Strategy
For migrations that modify existing data:
- Existing rows handled — default values for new columns, or explicit data migration
- Null safety — new NOT NULL columns require a DEFAULT or data backfill
- Large table performance — SQLite locks the entire database during writes
- Runtime-dependent guarantees are probed, not assumed — see below
Guarantees that rest on engine runtime behavior need a multi-row probe. When the assessment claims an at-rest, security, or data-integrity guarantee that depends on a specific runtime/engine behavior (e.g. SQLite PRAGMA secure_delete, VACUUM page reuse, WAL checkpoint timing, FTS5 shadow-table residue), the assessment MUST specify a multi-row/multi-write empirical probe as part of the required test strategy — not a single-row assertion, which can read clean whether or not the mechanism works. It MUST NOT phrase the guarantee as absolute ("scrubbed", "removed") when only a probabilistic or partial mechanism is available ("reduces residue", "partial scrub"); once the probe exists, state the measured bound (e.g. "3–14 of 200 rows survive with the pragma, 200+ without").
Step 4: Flyway Integration
- Migration file follows naming:
V{N}__{Description}.sql - Version number is sequential (no gaps, no conflicts with existing migrations)
- Migration is idempotent where possible
DirectDatabaseSchemaManagerupdated if new tables are added (insert in FK dependency order)
Step 5: Rollback Considerations
- Can the migration be reversed manually if needed?
- Is the schema change backward compatible with the previous application version?
- Docker volume data survives container restarts — migration is permanent
Output
Compose the migration-assessment note with findings from each step. Flag any SQLite-specific risks. Reference .claude/skills/spec-quality/references/project-concerns.md for additional codebase constraints.
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.

