What problem does it solve?
Developing with PostgreSQL, SQLAlchemy, and Alembic involves complex schema design, migrations, and performance tuning. This Skill provides expert guidance and guardrails to prevent common pitfalls and ensure robust, efficient database operations, allowing you to focus on building features.
Core Features & Use Cases
- Schema Design & Modeling: Get best practices for tables, constraints, indexes, and SQLAlchemy ORM models, ensuring data integrity and optimal structure.
- Alembic Migrations: Safely create and manage database schema changes, including concurrent index creation, minimizing downtime and risk.
- Performance & Ops: Optimize queries, diagnose locks, and follow safety guardrails for critical operations, keeping your application fast and reliable.
- Use Case: When designing a new feature requiring database changes, use this Skill to ensure your schema is robust, migrations are safe, and queries are performant from the start, avoiding costly refactors later.
Quick Start
Using the postgresql skill, provide an example SQLAlchemy model for a 'Product' table with fields for name, price, and a foreign key to a 'Category' table.