Generate Migration Skill
Trigger a GitHub Actions workflow to autogenerate Alembic migrations.
Usage
gh workflow run generate-migration.yaml -f message="your migration description"
Then monitor:
# Get run ID
RUN_ID=$(gh run list --workflow=generate-migration.yaml --limit 1 --json databaseId --jq '.[0].databaseId')
# Watch it
gh run watch $RUN_ID
How It Works
The workflow:
- Sets up PostgreSQL in CI/CD
- Runs existing migrations
- Runs
alembic revision --autogenerate - Commits and pushes the migration file
After Generation
- Pull the latest changes:
git pull - Review the generated migration file
- Push and let tests run
Troubleshooting
- Workflow fails:
gh run view <run-id> --log - No changes detected: Verify model changes are saved
- Merge conflicts: Pull latest before generating
Converted and distributed by TomeVault — claim your Tome and manage your conversions.