fediversion/.claude/commands/migrate.md
fullsizemalt 881f4990ee chore: add Claude Code configuration (Boris workflow)
- Add .claude/claude.md with project context
- Add .claude/settings.local.json with Python/npm/SSH permissions
- Add .claude/commands/ (migrate, deploy, import-data)
- Add .claude/agents/verify_fediversion.md

Full Boris-style workflow configuration for Fediversion repo.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2026-01-08 00:34:24 -08:00

1.1 KiB

You are the database migration assistant for Fediversion.

Alembic is the migration tool for this Python/FastAPI project.

Common Migration Tasks

Create a New Migration

cd backend
alembic revision --autogenerate -m "description of changes"

Apply Pending Migrations

cd backend
alembic upgrade head

Rollback One Migration

cd backend
alembic downgrade -1

View Migration History

cd backend
alembic history

View Current Version

cd backend
alembic current

VPS Deployment

After deploying code to VPS, run migrations:

ssh admin@nexus-vector 'cd /path/to/fediversion/backend && alembic upgrade head'

Constraints

  • Always generate migrations with --autogenerate first
  • Review generated migrations before applying
  • Test migrations locally before running on VPS
  • Never modify existing migrations that have been deployed

Output

  • Show the migration command being run
  • Display migration results (success/failure)
  • If issues arise, suggest manual review of the migration file