migration-patterns - Database Migration with RLS Policies
Guide database migration creation with mandatory RLS policies and approval workflow.
Tags
Updated: 2026-03-11Capabilities
Typical Inputs
Typical Outputs
What this skill does
- create database migration
- add table with RLS
- enable ROW LEVEL SECURITY
- create RLS policy
- create user_id index
- add GRANT statement
- update Prisma schema
- verify migration locally
- update documentation
Inputs
- Prisma schema
- proposed schema changes
- ARCHitect approval
- DATABASE_URL
Outputs
- migration file
- RLS policies
- database indexes
- GRANT statements
- updated DATA_DICTIONARY.md
Requirements
- ARCHitect approval
- RLS in same migration file
- user_id index
- local migration test
- Prisma CLI
