Run database migrations against the target environment. Use when applying schema changes, running pending migrations, or checking migration status. Do NOT use for seed data insertion or database backups.
Apply pending database migrations to a target environment (dev, staging, production) using Alembic.
Read the environment argument. Valid values: dev, staging, production.
If production is specified, require confirmation via AskUserQuestion before proceeding:
"You are about to run migrations against PRODUCTION. This cannot be undone automatically. Continue?"
alembic --config config/${env}.ini current
alembic --config config/${env}.ini headsIf --status flag is set, display current revision and pending migrations, then stop.
alembic --config config/${env}.ini upgrade headReport the number of migrations applied and the new current revision.
Run the schema validation script:
python scripts/verify_schema.py --env ${env}Report any discrepancies between the expected schema and the actual database state.
If --rollback <N> is specified, roll back N migrations instead of applying:
alembic --config config/${env}.ini downgrade -${N}LuminairPrime/git-worktrees-prime
49d6ae2
If you maintain this skill, you can claim it as your own. Once claimed, you can manage eval scenarios, bundle related skills, attach documentation or rules, and ensure cross-agent compatibility.