| name | db-migrate |
| description | Create a database migration. Use when changing schema, adding tables, or modifying columns. |
| disable-model-invocation | true |
Database Migration
Create a new reversible database migration.
Steps
- Determine next migration number from
backend/migrations/
- Create
backend/migrations/TIMESTAMP_description.ts
- Follow the migration template
- Implement both
up() and down() functions
- Test rollback: run
npm run migrate:down then npm run migrate:up
See conventions.md for naming and patterns.
Arguments: $ARGUMENTS — description of what the migration does