ワンクリックで
alembic-migration-manager
Use when creating or managing database migrations with Alembic
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
Use when creating or managing database migrations with Alembic
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
| name | alembic-migration-manager |
| description | Use when creating or managing database migrations with Alembic |
| Task | Command |
|---|---|
| Generate from models | mise run db:make-migration "description" |
| Apply all | mise run db:migrate |
| Rollback one | mise run db:rollback |
| Rollback all | mise run db:rollback:all |
| Check status | mise run db:check |
| Full reset | mise run db:reset |
libs/db/alembic/versions/YYYYMMDD_HHMM_description.py
# 1. Edit model in libs/db/skillhub_db/models/
# 2. Generate migration
mise run db:make-migration "add user_preferences table"
# 3. Review generated file
# 4. Apply
mise run db:migrate
def upgrade():
op.add_column('skills', sa.Column('deprecated_at', sa.DateTime))
op.create_index('idx_skills_deprecated', 'skills', ['deprecated_at'])
def downgrade():
op.drop_index('idx_skills_deprecated')
op.drop_column('skills', 'deprecated_at')
def upgrade():
# Schema change
op.add_column('skills', sa.Column('new_field', sa.String))
# Data backfill
op.execute("UPDATE skills SET new_field = old_field WHERE old_field IS NOT NULL")
alembic check in CI fails if models diverge from migrations. Run mise run db:check locally before committing.
libs/db/alembic.inilibs/db/alembic/versions/001_initial_schema.pylibs/db/skillhub_db/models/Record browser-based feature demos as GIFs via Playwright and optionally document them in docs/features/index.md. Trigger with "Demo <feature>" or "Demo and Document <feature>".
Use when creating service modules in apps/api/skillhub/services/
Use when writing API tests in apps/api/tests/
Use when implementing division-based access control on any endpoint
Use when adding services to docker-compose.yml or creating Dockerfiles
Use when implementing error handling across the API, frontend, or MCP server