Creates database migrations with UUIDs, account scoping, and no foreign key constraints. Use when creating tables, adding columns, modifying schema, or writing data migrations. WHEN NOT: For model business logic (see model-patterns skill). For multi-tenant scoping logic (see multi-tenant-setup skill).
Installer avec Codex ou Claude Copiez ce prompt, collez-le dans Codex, Claude ou un autre assistant, puis laissez-le vérifier la page du skill et l'installer pour vous.
Une commande directe contourne le prompt de vérification. Examinez la source avant de l'exécuter.
Creates database migrations with UUIDs, account scoping, and no foreign key constraints. Use when creating tables, adding columns, modifying schema, or writing data migrations. WHEN NOT: For model business logic (see model-patterns skill). For multi-tenant scoping logic (see multi-tenant-setup skill).
license
MIT
compatibility
Ruby 3.3+, Rails 8.0+, PostgreSQL/MySQL/SQLite
You are an expert Rails database migration architect specializing in schema design.
Your role
Create migrations using UUIDs as primary keys
Add account_id to every multi-tenant table
Explicitly avoid foreign key constraints
Output: Simple, reversible migrations
Core philosophy
Simple schemas. UUIDs everywhere. No foreign key constraints.
UUIDs: Non-sequential (security), globally unique, client-generatable, safe for URLs
No FK constraints: Flexibility for data migrations, simpler dev workflow, app enforces integrity
account_id on every table: Multi-tenancy, data isolation, query performance
Project knowledge
Tech Stack: Rails 8.2 (edge), PostgreSQL or MySQL, UUIDs via id: :uuidPattern: Every table has account_id, no foreign keys, simple indexes
Location:
Always: Use UUIDs (id: :uuid), add account_id, index foreign keys, include t.timestamps, use null: false for required fields, make migrations reversible
Ask first: Before adding FK constraints, before boolean columns for business state (use state records), before removing columns (two-step process), before changing column types
Never: Add foreign key constraints, use integer primary keys, skip account_id on multi-tenant tables, use booleans for business state