/f5-core:f5-db <migrate|seed|schema> [action]from f5-core
Manages database operations including schema viewing, migrations, seeding, model generation, and ER diagrams. Auto-detects the project's database stack and ORM, then executes the appropriate commands.
Ships in f5-core. Installing the plugin adds it to Claude Code.
Hỗ trợ quản lý database theo stack đã chọn trong project.
The user's request is: $ARGUMENTS
# Auto-detect from .f5/config.json
DB=$(jq -r '.stack.database // "postgresql"' .f5/config.json 2>/dev/null)
BACKEND=$(jq -r '.stack.backend // "nestjs"' .f5/config.json 2>/dev/null)
| Command | Description |
|---|---|
schema | View current database schema |
migrate | Run pending migrations |
migrate create <name> | Create new migration |
migrate rollback | Rollback last migration |
seed | Run database seeders |
seed create <name> | Create new seeder |
reset | Reset database (migrate + seed) |
model <name> | Generate model/entity |
diagram | Generate ER diagram |
| Backend | Database | ORM/Client |
|---|---|---|
| NestJS | PostgreSQL | Prisma |
| NestJS | MySQL | TypeORM |
| FastAPI | PostgreSQL | SQLAlchemy |
| Django | PostgreSQL | Django ORM |
| Spring | PostgreSQL | JPA/Hibernate |
| Go | PostgreSQL | GORM |
| Laravel | MySQL | Eloquent |
| Rails | PostgreSQL | ActiveRecord |
| .NET | SQL Server | Entity Framework |
| Rust | PostgreSQL | Diesel |
# View schema
/f5-db schema
# Generate schema diagram
/f5-db diagram
Output:
## Database Schema: {{DB_NAME}}
### Tables:
{{table list with columns}}
### Relationships:
{{ER diagram in mermaid}}
# Create migration
/f5-db migrate create add_users_table
# Run migrations
/f5-db migrate
# Rollback
/f5-db migrate rollback
# Generate model from table
/f5-db model User
# Generate with relations
/f5-db model Order --relations
/f5-db prisma generate # Generate client
/f5-db prisma studio # Open Prisma Studio
/f5-db prisma format # Format schema
/f5-db alembic revision # Create revision
/f5-db alembic upgrade # Apply migrations
/f5-db alembic downgrade # Rollback
/f5-db makemigrations # Create migrations
/f5-db migrate # Apply migrations
/f5-db shell # Database shell
/f5-db typeorm migration:create
/f5-db typeorm migration:run
/f5-db typeorm migration:revert
/f5-db artisan migrate
/f5-db artisan migrate:rollback
/f5-db artisan db:seed
# Schema operations
/f5-db schema
/f5-db diagram
# Migrations
/f5-db migrate create create_orders_table
/f5-db migrate
/f5-db migrate rollback
# Models
/f5-db model User
/f5-db model Product --relations
# Seeding
/f5-db seed create UserSeeder
/f5-db seed
# Reset for development
/f5-db reset
/f5-db mongo schema # View collections
/f5-db mongo index <col> # Create indexes
/f5-db mongo model <name> # Generate Mongoose model
/f5-db redis keys # List keys
/f5-db redis flush # Flush database
/f5-db redis info # Show info
Claude automatically applies:
Naming Conventions
Common Patterns
Performance
Security
What the command file sets; muted values are Claude Code's defaults
PostgreSQL, MySQL, SQL Server, Prisma, TypeORM, SQLAlchemy, Django, Laravel
7-day visitors to each command page
Claude Code installs this plugin but refuses to load it
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
hooks/hooks.json: hooks.json declares PreToolUse/PermissionRequest at its top level, outside the "hooks" object — a PreToolUse/PermissionRequest hook that cannot be loaded may be what guards the permissions declared beside it, so nothing it sits in is applied until the entry is fixed or removed
Checked against Claude Code 2.1.332. The listing below is what the repository ships; Claude Code doesn't load it as published.
70 commands in this plugin
/f5-agent/f5-agent - Unified AI Agent CommandManage AI agents, personas, and get smart suggestions/f5-analytics/f5-analytics - F5 Framework Analytics & Metrics SystemView project analytics and metrics/f5-ba/f5-ba - Business Analysis Workflow CommandBusiness analysis workflow/f5-backend/f5-backend - Backend Development AssistantBackend development commands/f5-checkpoint⚠️ DEPRECATED: /f5-checkpoint[DEPRECATED] Use /f5-ctx checkpoint/f5-classify/f5-classify - Input Classification Command V3.0Classify input files by type using content-first analysis, detect gaps, and generate coverage declarationOther plugins' commands for the same job