What problem does it solve?
Writing database migrations in the Nango codebase requires following specific conventions: choosing the correct migration directory, using timestamped .cjs filenames, matching existing migration style, and deciding rollback and foreign key delete behavior. This Skill guides the AI through each of those decisions so migrations stay consistent with the repository.
Core Features & Use Cases
- Directory Selection: Identifies the correct migration directory, such as packages/database/lib/migrations/ for the main database or service-specific directories.
- Naming & Style Conventions: Enforces the <YYYYMMDDHHMMSS>_<description>.cjs filename format and instructs reading recent migrations to match their style.
- Rollback & Foreign Key Decisions: Prompts for explicit exports.down behavior and applies ON DELETE CASCADE for ownership relationships versus ON DELETE SET NULL for optional references.
- Use Case: When adding a new customer_keys table to the Nango database, the Skill produces a properly named migration file like 20260420120000_create_customer_keys.cjs with confirmed rollback logic and correct foreign key constraints.
Quick Start
Create a new Nango database migration that adds a customer_keys table with a foreign key to the accounts table.