一键导入
prisma-migration
Create and validate Prisma database migrations. Use after schema.prisma changes or when adding new database features.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
菜单
Create and validate Prisma database migrations. Use after schema.prisma changes or when adding new database features.
用 Codex 或 Claude 帮你安装 复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它检查 Skill 页面并帮你完成安装。
基于 SOC 职业分类
Generate CRUD API endpoints following OpenOrder patterns (Fastify, Prisma, Zod, RBAC)
Scaffold new POS or payment adapter implementations. Use when adding support for Square, Toast, Clover, Stripe, or other integrations.
Create conventional commits following OpenOrder standards with AGPL co-authoring
Initialize Docker development environment with database migrations. Use for first-time setup or after pulling major changes.
Run comprehensive checks across the entire monorepo. Use before creating PRs or after making cross-package changes.
Audit codebase for security vulnerabilities, secret leakage, dependency risks, and configuration issues. Use before commits, when adding dependencies, or reviewing PRs. Enforces zero-secrets policy, dependency isolation, and secure build practices.
| name | prisma-migration |
| description | Create and validate Prisma database migrations. Use after schema.prisma changes or when adding new database features. |
| disable-model-invocation | false |
| allowed-tools | Bash(cd apps/api*), Bash(npx prisma*), Read, Edit |
This skill streamlines the database migration workflow with proper naming conventions and validation.
Detect Schema Changes
apps/api/prisma/schema.prisma has uncommitted changesGenerate Migration Name
add_table_name, update_field_type, remove_column_nameadd_order_notes - Adding new tableupdate_price_to_bigint - Changing field typeadd_restaurant_timezone - Adding new fieldCreate Migration
cd apps/api && npx prisma migrate dev --name <migration-name>
Regenerate Prisma Client
npx prisma generate
Verify Migration
apps/api/prisma/migrations/Post-Migration Checks
cd apps/storefront && npm run build
cd apps/dashboard && npm run build
Important Reminders
docker compose down -v && docker compose up -dnpx prisma generate after schema changesIf migration fails:
npx prisma migrate reset for development (WARNING: deletes all data)Int for monetary values, never Float@default(now()) for createdAt, @updatedAt for updatedAtJson type for posConfig, paymentConfig@default(autoincrement()) for orderNumber per restaurant