← Back to list

vkc-drizzle-schema-migration
by LEE-SANG-BOK
⭐ 0🍴 0📅 Jan 24, 2026
SKILL.md
name: vkc-drizzle-schema-migration description: Standardize Drizzle schema/migration/seed workflow for Viet K-Connect. Use when adding or changing DB tables, especially DB-driven visa rulesets and document templates (no hardcoding). metadata: short-description: Drizzle schema + migration workflow
VKC Drizzle Schema & Migration
When to use
- Adding/updating DB tables/enums/indexes
- Introducing DB-driven configuration (visa rulesets, doc templates, regulation snapshots)
Hard rules
- DB schema lives in
src/lib/db/schema.ts. - Migrations are generated/applied via
drizzle-kit(npm run db:generate,npm run db:migrate). - Visa rulesets and doc templates MUST be DB tables, not hardcoded TS objects.
- Coordinate ownership:
src/lib/db/schema.tsandsrc/lib/db/migrations/**should not be modified concurrently by multiple agents.
Workflow
- Update
src/lib/db/schema.ts
- Add table(s), enum(s), indexes.
- Prefer explicit indexes for
(userId, createdAt)where rate limits depend on time windows.
- Generate migration
npm run db:generate
- Apply migration locally (if DB configured)
npm run db:migrate
- Seed (if needed)
- Use
npm run db:seedor project seed scripts.
References
- Rules & examples:
.codex/skills/vkc-drizzle-schema-migration/references/drizzle-rules.md
Score
Total Score
50/100
Based on repository quality metrics
✓SKILL.md
SKILL.mdファイルが含まれている
+20
○LICENSE
ライセンスが設定されている
0/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