What problem does it solve?
Database schema changes are inherently risky and complex, often leading to data loss or inconsistencies if not managed properly. This Skill ensures the safe, consistent, and version-controlled evolution of your PostgreSQL database schema using Prisma.
Core Features & Use Cases
- Prisma Migration Workflow: Create and apply database migrations using the Prisma CLI, automating schema updates and tracking changes.
- Split Schema Management: Organize schema definitions by domain (e.g.,
member.prisma, article.prisma) for improved clarity and maintainability in large projects.
- Data Integrity & Conventions: Implement best practices like UUID primary keys, soft deletes, and proper indexing to maintain robust data integrity.
- Use Case: When adding a new field to an existing database table, use this Skill to generate a new Prisma migration, apply it, and ensure the database schema is updated without manual intervention or risk of data loss.
Quick Start
Guide me through creating a new Prisma migration to add a 'description' field to the 'Article' model, ensuring it's nullable and properly indexed.