What problem does it solve?
This Skill streamlines the complex and error-prone tasks of designing database schemas, managing migrations, and optimizing query performance for the TheMoon project.
Core Features & Use Cases
- Schema Design: Provides best practices and templates for creating robust and scalable PostgreSQL schemas using SQLAlchemy.
- Migration Management: Guides users through Alembic workflows for creating, applying, and rolling back database schema changes.
- Query Optimization: Offers strategies and examples for improving database performance through indexing, query tuning, and avoiding common pitfalls like the N+1 problem.
- Use Case: A developer needs to add a new
roast_level column to the beans table. This Skill can guide them through creating the SQLAlchemy model, generating the Alembic migration, and applying it to the database.
Quick Start
Use the database-operations skill to create a new Alembic migration for adding a 'roast_level' column to the 'beans' table.