What problem does it solve?
This Skill addresses the challenge of defining robust, type-safe, and well-indexed database schemas for Convex applications, ensuring data integrity and efficient querying.
Core Features & Use Cases
- Schema Definition: Provides tools and examples for defining tables, fields, and their types using Convex's schema definition language.
- Data Validation: Ensures data conforms to defined types, including strings, numbers, booleans, unions, and optional fields.
- Index Configuration: Demonstrates how to define single-field, compound, and search indexes for optimized query performance.
- Migration Strategies: Outlines best practices for evolving schemas over time, including adding fields and backfilling data.
- Use Case: A developer needs to set up a new
products table in their Convex backend, including fields like name, price, category, and an index for efficient searching by category.
Quick Start
Use the convex-schema-validator skill to define a new 'users' table with 'name' and 'email' fields.