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

55 lines
1.1 KiB
Markdown

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
```bash
cd backend
alembic revision --autogenerate -m "description of changes"
```
### Apply Pending Migrations
```bash
cd backend
alembic upgrade head
```
### Rollback One Migration
```bash
cd backend
alembic downgrade -1
```
### View Migration History
```bash
cd backend
alembic history
```
### View Current Version
```bash
cd backend
alembic current
```
## VPS Deployment
After deploying code to VPS, run migrations:
```bash
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