Compozy Schema Migration
SkillDatabases & dataLets your agent create SQLite schema migrations (tables, columns, indexes) and keep related schema files and tests in sync.
Available today. Use it from your connected AI after setup.
No other account needed.
Connect ahel once, and every AI you use reads what you have installed.
Then ask your AI: use the Compozy Schema Migration skill
About this capability
Change Compozy SQLite tables, columns, indexes, constraints, triggers, or seed data under internal/store or internal/memory using append-only Goose migrations and owning generators. Excludes in-memory structures, Markdown memory, and non-SQLite caches.
What this skill tells your AI
The instructions your AI receives, as published by compozy/compozy in .agents/skills/eng/eng-schema-migration/SKILL.md and read by ahel’s review.
Procedure
- Read
references/migration-decision.mdand classify the changed datum and owning stream:globalandmemorysharecompozy.db;sessionowns eachevents.db;workspaceowns workspace observability databases. - Inspect the owner's declarative schema source (
schema/schema.sqlorschema/definitions/*.sql),schema/migrations/,schema/migrations/atlas.sum,migration_stream.go, sqlc query catalog, and canonical migration/open tests. Select the next gap-free five-digit version. Never edit, rename, renumber, reorder, or delete an existing migration or its checksum entry. - Read
references/migration-template.md. Edit the owning declarative source, then runmake codegen. Inspect the newly appended Goose SQL, Atlas sqlcheck result, refreshedatlas.sum, and regenerated sqlc output. If the generated tail is wrong, correct the declarative schema and regenerate; add bounded data transformation SQL only to the unpublished tail, then rerunmake codegen. - Update affected static queries in the owning sqlc catalog. Keep generated
sqlcgentypes inside the owner package and map them to domain types at the repository boundary. - Read
references/migration-test-patterns.md. Extend the canonical suites for fresh apply, reopen with preserved data, ahead-version refusal, integrity failure, sequential history, and migrations-to-declarative-schema equivalence. When global or memory changes, also prove their shared-file table ownership remains disjoint. - If recovery or refusal guidance changes, move the whole stopped SQLite family (
.db,-wal,-shm, and sibling databases) to cold storage; never move or edit one live file. Prefer a newer compatible binary forschema_aheadwhen state must be preserved. - Run scoped
-racetests for the owning stream,make codegen-check,make lint, thenmake gatebefore push. Exact-head PR CI owns full completion verification.
Error Handling
- Stop on any
atlas.summismatch or edited historical byte. Restore the exact unpublished history or append a new migration; never weaken validation or edit a Goose version table. - Resolve destructive Atlas diagnostics in the design. Do not suppress sqlcheck to force generation.
- Document every greenfield hard cut and delete target in the spec/ADR. Do not ship aliases, dual schemas, or open-ended repair branches.
- Treat a pre-Goose marker as
legacy_databaseand a recorded version above the embedded head asschema_ahead; neither condition authorizes in-place mutation.
Signals
- GitHub stars
- 3k
- Forks
- 177
- Last commit
- Sep 2026
Advanced
- Catalog kind
- skill
- Gateway key
eng-schema-migration- Source
- github.com/compozy/compozy