Files
devops-platform-api/prisma/migrations/README.md
T
2026-06-11 20:49:59 +08:00

13 lines
738 B
Markdown

# Prisma Migration Structure
This project uses Prisma as the default data access layer.
Migration policy:
- Create schema changes with `pnpm prisma:migrate:dev --name <change-name>` after the final MySQL connection details are confirmed.
- Commit generated folders under `prisma/migrations/<timestamp>_<change-name>/migration.sql`.
- Run migration checks in deployment before starting the API.
- Keep raw SQL exceptional. If native SQL is required for performance or vendor-specific behavior, place it behind a Repository method and document why Prisma Client is not sufficient.
The first-stage schema is defined in `prisma/schema.prisma`; no live migration is executed until a local or staging MySQL database is explicitly provided.