What problem does it solve?
Managing database schema changes, ensuring data integrity, and optimizing queries can be complex and error-prone. This Skill provides a structured approach to database operations for Afilo's digital marketplace using Prisma ORM with Neon PostgreSQL.
Core Features & Use Cases
- Schema Management: Guides through updating
schema.prisma and generating database migrations with a clear checklist.
- Query Optimization: Offers best practices for efficient data retrieval, including using
include for related data and batch operations.
- Data Relationships: Defines and manages complex relationships between core models like products, users, and chat systems.
- Use Case: A data engineer needs to add a new field to the
products table and ensure all related data models are updated. This skill provides a checklist for schema migration, helps optimize queries for the new field, and ensures data validation.
Quick Start
Use the database-ops skill to add a new is_featured boolean field to the products table in schema.prisma, then generate and apply the necessary migration.