← Back to list

data-migration
by Masked-Kunsiquat
⭐ 0🍴 1📅 Jan 24, 2026
SKILL.md
name: data-migration description: Plan and implement CRM Orbit data migrations for Automerge snapshots and Drizzle persistence, including schema additions, event payload changes, and backfills. Use when adding/removing fields, changing persisted structures, or introducing new events that require compatibility or data backfill.
Data Migration
Overview
Implement safe, deterministic migrations for CRM Orbit local persistence (Drizzle/SQLite) and Automerge snapshots while preserving event-log semantics.
Workflow
- Classify the change
- Schema-only (Drizzle table changes, snapshot fields)
- Event payload change (new fields required)
- Backfill required (existing data needs derived values)
- Update persistence
- Add Drizzle migrations for new columns/tables.
- Update persistence loader/serializer to accept old shapes and default new fields.
- Preserve snapshot compatibility
- If snapshot format changes, add versioned handling in load path.
- Keep encoding/decoding boundary locale-neutral.
- Backfill via events
- Emit migration events or deterministic backfill logic in reducers.
- Never mutate state directly or infer history from diffs.
- Verify
- Add/update reducer tests and persistence loader tests.
- Add event->state snapshot tests for migration paths.
Guardrails
- Automerge is source of truth.
- Event log is append-only and human-readable.
- Reducers remain pure and deterministic.
- Persistence remains dumb (no business rules).
- Persisted data stays locale-neutral.
Common files
CRMOrbit/automerge/schema.tsCRMOrbit/domains/persistence/*CRMOrbit/events/*,CRMOrbit/reducers/*CRMOrbit/tests/*
Score
Total Score
60/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
✓LICENSE
ライセンスが設定されている
+10
○説明文
100文字以上の説明がある
0/10
○人気
GitHub Stars 100以上
0/15
○最近の活動
3ヶ月以内に更新がある
0/10
○フォーク
10回以上フォークされている
0/5
✓Issue管理
オープンIssueが50未満
+5
✓言語
プログラミング言語が設定されている
+5
○タグ
1つ以上のタグが設定されている
0/5
Reviews
💬
Reviews coming soon