CtrlK
BlogDocsLog inGet started
Tessl Logo

vkc-drizzle-schema-migration

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). (키워드= 드리즐, DB 스키마, 마이그레이션, seed, schema.ts, migrations)

84

Quality

81%

Does it follow best practices?

Impact

Pending

No eval scenarios have been run

SecuritybySnyk

Passed

No known issues

SKILL.md
Quality
Evals
Security

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.ts and src/lib/db/migrations/** should not be modified concurrently by multiple agents.

Workflow

  1. 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.
  1. Generate migration
  • npm run db:generate
  1. Apply migration locally (if DB configured)
  • npm run db:migrate
  1. Seed (if needed)
  • Use npm run db:seed or project seed scripts.

References

  • Rules & examples: .codex/skills/vkc-drizzle-schema-migration/references/drizzle-rules.md
Repository
LEE-SANG-BOK/VKC-2-
Last updated
Created

Is this your skill?

If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.