21 DATABASE Development and operations Low

Database Engineering — Safe Migrations

Alembic migration generation with upgrade/downgrade verification and provenance.

intake ★★☆
architect ★★★
vigil ★★☆
licit ★☆☆

Automated database migration generation with upgrade-downgrade cycle verification and provenance tracking.

Phase 01 intake

Migration spec

Generates spec from Jira and current schema.

◻ intake
intake init "Add Audit Trail Tables" \
  --source jira://DB/DB-456 \
  --source schema/current-erd.png \
  --format architect
Phase 02 architect

Migration generation

Loop with upgrade and downgrade verification.

△ architect
architect loop "Generate Alembic migration for audit trail" \
  --check "alembic upgrade head" \
  --check "alembic downgrade -1 && alembic upgrade head" \
  --check "vigil scan migrations/" \
  --max-iterations 10