feat(marketplace): command consolidation + 8 new plugins (v8.1.0 → v9.0.0) [BREAKING]
Phase 1b: Rename all ~94 commands across 12 plugins to /<noun> <action> sub-command pattern. Git-flow consolidated from 8→5 commands (commit variants absorbed into --push/--merge/--sync flags). Dispatch files, name: frontmatter, and cross-reference updates for all plugins. Phase 2: Design documents for 8 new plugins in docs/designs/. Phase 3: Scaffold 8 new plugins — saas-api-platform, saas-db-migrate, saas-react-platform, saas-test-pilot, data-seed, ops-release-manager, ops-deploy-pipeline, debug-mcp. Each with plugin.json, commands, agents, skills, README, and claude-md-integration. Marketplace grows from 12→20. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
92
plugins/saas-db-migrate/commands/db-migrate-setup.md
Normal file
92
plugins/saas-db-migrate/commands/db-migrate-setup.md
Normal file
@@ -0,0 +1,92 @@
|
||||
---
|
||||
name: db-migrate setup
|
||||
description: Setup wizard for migration tool detection and configuration
|
||||
agent: migration-planner
|
||||
---
|
||||
|
||||
# /db-migrate setup - Migration Platform Setup Wizard
|
||||
|
||||
## Skills to Load
|
||||
|
||||
- skills/orm-detection.md
|
||||
- skills/visual-header.md
|
||||
|
||||
## Visual Output
|
||||
|
||||
Display header: `DB-MIGRATE - Setup Wizard`
|
||||
|
||||
## Usage
|
||||
|
||||
```
|
||||
/db-migrate setup
|
||||
```
|
||||
|
||||
## Workflow
|
||||
|
||||
### Phase 1: Migration Tool Detection
|
||||
|
||||
Scan the project for migration tool indicators:
|
||||
|
||||
| File / Pattern | Tool | Confidence |
|
||||
|----------------|------|------------|
|
||||
| `alembic.ini` in project root | Alembic | High |
|
||||
| `alembic/` directory | Alembic | High |
|
||||
| `sqlalchemy` in requirements | Alembic (likely) | Medium |
|
||||
| `prisma/schema.prisma` | Prisma | High |
|
||||
| `@prisma/client` in package.json | Prisma | High |
|
||||
| `migrations/` with numbered `.sql` files | Raw SQL | Medium |
|
||||
| `flyway.conf` | Flyway (raw SQL) | High |
|
||||
| `knexfile.js` or `knexfile.ts` | Knex | High |
|
||||
|
||||
If no tool detected, ask user to select one.
|
||||
|
||||
### Phase 2: Configuration Mapping
|
||||
|
||||
Identify existing migration configuration:
|
||||
|
||||
- **Migration directory**: Where migration files live
|
||||
- **Model directory**: Where ORM models are defined (for auto-generation)
|
||||
- **Database URL**: Connection string location (env var, config file)
|
||||
- **Naming convention**: How migration files are named
|
||||
- **Current state**: Latest applied migration
|
||||
|
||||
### Phase 3: Database Connection Test
|
||||
|
||||
Attempt to verify database connectivity:
|
||||
|
||||
- Read connection string from detected location
|
||||
- Test connection (read-only)
|
||||
- Report database type (PostgreSQL, MySQL, SQLite)
|
||||
- Report current schema version if detectable
|
||||
|
||||
### Phase 4: Validation
|
||||
|
||||
Display detected configuration summary and ask for confirmation.
|
||||
|
||||
## Output Format
|
||||
|
||||
```
|
||||
+----------------------------------------------------------------------+
|
||||
| DB-MIGRATE - Setup Wizard |
|
||||
+----------------------------------------------------------------------+
|
||||
|
||||
Migration Tool: Alembic 1.13.1
|
||||
ORM: SQLAlchemy 2.0.25
|
||||
Database: PostgreSQL 16.1
|
||||
Migration Dir: ./alembic/versions/
|
||||
Model Dir: ./app/models/
|
||||
DB URL Source: DATABASE_URL env var
|
||||
|
||||
Current State:
|
||||
Latest Migration: 2024_01_15_add_orders_table (applied)
|
||||
Pending: 0 migrations
|
||||
|
||||
Configuration saved to .db-migrate.json
|
||||
```
|
||||
|
||||
## Important Notes
|
||||
|
||||
- This command does NOT run any migrations; it only detects and configures
|
||||
- Database connection test is read-only (SELECT 1)
|
||||
- If `.db-migrate.json` already exists, offer to update or keep
|
||||
- All subsequent commands rely on this configuration
|
||||
Reference in New Issue
Block a user