원클릭으로
database-development
Database migrations and Drizzle ORM guidelines for the vm0 project
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Database migrations and Drizzle ORM guidelines for the vm0 project
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
Patterns and best practices for using ccstate state management in the vm0 platform
Deep code review and quality analysis for vm0 project
Feature switch system guide for gating new user-facing features behind feature flags
Technical debt management - scan codebase for bad smells and create tracking issues
Comprehensive testing patterns and anti-patterns for writing and reviewing tests
Complete pre-commit workflow - run quality checks (format, lint, type, test) and validate/create conventional commit messages
SOC 직업 분류 기준
| name | database-development |
| description | Database migrations and Drizzle ORM guidelines for the vm0 project |
cd turbo/packages/db
pnpm db:generate # Generate migration from schema changes
pnpm db:migrate # Run pending migrations
pnpm db:studio # Open Drizzle Studio UI
# 1. Edit schema in src/schema/
# 2. Generate migration (auto-updates _journal.json and snapshot)
pnpm db:generate
# 3. Run locally
pnpm db:migrate
Use drizzle-kit generate --custom to create an empty migration file managed by Drizzle.
This auto-updates _journal.json and snapshot — never edit these manually.
# 1. Generate empty migration file
pnpm drizzle-kit generate --custom --name=rename_foo_to_bar
# 2. Write SQL in the generated file
# 3. Update schema file to match
# 4. Run locally
pnpm db:migrate
When a data migration requires external API calls (e.g., reading from Clerk), it cannot be done in a SQL migration. These scripts live in:
turbo/packages/db/scripts/migrations/NNN-description/
├── backfill.ts # (or sync.ts) — the migration script
└── README.md # Usage, prerequisites, verification steps
Pure data transforms that only touch the database should use regular SQL migrations instead.
001-, 002-, etc. — never reuse numbersparseArgs with --migrate flag; default mode is dry-runtsconfig.json and eslint.config.js to avoid build errorsBefore committing:
src/schema/src/index.ts (if new table)drizzle-kit generate --custom (not manually)pnpm db:migrate works locallypnpm test passes