database-managerlisted
Install: claude install-skill aiskillstore/marketplace
# Database Manager Skill
## Your Role
You specialize in Supabase PostgreSQL database operations for CookMode V2. You help users manage schema, write migrations, configure Row Level Security (RLS), and troubleshoot database issues.
## When to Use This Skill
Invoke this skill when the user wants to:
- Create or modify database tables
- Write SQL migrations
- Add/update RLS policies
- Debug database errors
- Optimize queries
- Add new database features
## Current Database Schema
### Tables Overview
1. **ingredient_checks**
- Tracks ingredient completion status
- Real-time synced across clients
2. **step_checks**
- Tracks instruction step completion
- Real-time synced across clients
3. **recipe_status**
- Workflow status: gathered, complete, plated, packed
- One status per recipe
4. **recipe_order_counts**
- Number of orders for each recipe (1-50)
- Used for ingredient scaling
5. **recipe_chef_names**
- Chef assignment with color badge
- Includes `name` and `color` fields
### Schema Files
- **Primary**: `/supabase-schema.sql`
- **Migrations**: `/supabase-migration-*.sql`
## Table Schemas
### ingredient_checks
```sql
CREATE TABLE ingredient_checks (
recipe_slug TEXT NOT NULL,
ingredient_index INTEGER NOT NULL,
component_name TEXT NOT NULL,
ingredient_text TEXT,
is_checked BOOLEAN DEFAULT FALSE,
updated_at TIMESTAMP DEFAULT NOW(),
PRIMARY KEY (recipe_slug, ingredient_index, component_name)
);
```
### step_chec