| name | migration-review |
| description | 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. |
| user-invocable | false |
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 COLUMN works 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 INDEX work normally
Step 2: SQLite Constraint Check
Verify against known SQLite limitations:
Step 3: Data Migration Strategy
For migrations that modify existing data:
Step 4: Flyway Integration
Step 5: Rollback Considerations
Output
Compose the migration-assessment note with findings from each step. Flag any SQLite-specific risks. Reference project-concerns.md for additional codebase constraints.