What problem does it solve?
This Skill ensures database models are well-defined with proper naming, data types, constraints, and relationships, maintaining data integrity and clarity across the application, making your database schema robust and easy to understand.
Core Features & Use Cases
- Data Integrity: Define constraints (NOT NULL, UNIQUE), foreign keys, and model-level validation rules.
- Relationship Management: Structure one-to-many, many-to-many, and one-to-one relationships clearly and efficiently.
- Schema Design: Choose appropriate data types, add timestamps, and configure cascade behaviors for robust schema design.
- Use Case: When defining a new
Product model, this skill guides the AI to specify appropriate data types for fields like price and stock, add a foreign key to a Category model, include createdAt/updatedAt timestamps, and ensure proper indexing.
Quick Start
Define a new database model for 'OrderItems', including fields for 'quantity', 'price', and foreign keys linking to 'Order' and 'Product' models, ensuring data integrity.