migrate-database
/migrate-database
Move an existing Oracle, MySQL or PostgreSQL database to ScalarDB: schema analysis, migration documentation, stored procedure and trigger conversion to Java, AQ integration. Use for any database-to-ScalarDB migration; routes to the engine-specific workflow.
- Author
- wfukatsu ↗
- Repository
- nexus-architect ↗
- Licence
- MIT
- Last repository change
- 09.10.2026
Assessment and security
- Files in this package
- 1
- Scripts
- 0
- HTML comments
- 0
- URLs in SKILL.md
- 0
No signals detected. Repository changed on 09.10.2026, without references to retired models or APIs.
MIT, open: use and modify while retaining author attribution.
What it does and when to use it
Move an existing Oracle, MySQL or PostgreSQL database to ScalarDB: schema analysis, migration documentation, stored procedure and trigger conversion to Java, AQ integration. Use for any database-to-ScalarDB migration; routes to the engine-specific workflow.
Original author description
Move an existing Oracle, MySQL or PostgreSQL database to ScalarDB: schema analysis, migration documentation, stored procedure and trigger conversion to Java, AQ integration. Use for any database-to-ScalarDB migration; routes to the engine-specific workflow.
How it works
- Purpose
- Execution Instructions
- Related Commands
- Related Files
SKILL.md preview
---
description: |
Move an existing Oracle, MySQL or PostgreSQL database to ScalarDB: schema analysis, migration
documentation, stored procedure and trigger conversion to Java, AQ integration. Use for any
database-to-ScalarDB migration; routes to the engine-specific workflow.
model: sonnet
---
# Command: migrate-database (Unified Migration Entry Point)
Shared files: a path written `@rules/…`, `@skills/…`, `@templates/…` or `@docs/…` is relative to the
plugin root, `${CLAUDE_PLUGIN_ROOT}` — not to the project being worked on. Read it from there.
## Purpose
Unified entry point for all database-to-ScalarDB migrations. Asks the user which database type they want to migrate, then delegates to the appropriate database-specific command which handles everything: configuration detection, parameter collection, schema analysis, and migration documentation generation.
**Knowledge grounding**: the delegated workflows must verify ScalarDB capabilities (supported
databases, data types, transaction guarantees, edition-gated features) against the version-pinned
OKF knowledge bundle per @rules/okf-knowledge-bundle.md — pin the target ScalarDB version first
and cite the concept's `resource` URL, not memory.
**Application SQL**: this router migrates schemas, stored procedures and triggers. The SQL the application
runs — MyBatis mappers, JDBC and Spring JDBC calls, JPA native queries, batch scripts — is migrated statement by
statement by `/architect:design-sql-migration` → `/architect:implement-sql-migration` →
`/architect:verify-sql-migration`; point the user there when the question is about queries rather than tables.
---
## Execution Instructions
Follow these steps in order, without skipping either: the first decides which database-specific skill the second delegates to.
---
### STEP 1: Ask Which Database to Migrate
Use the `AskUserQuestion` tool to determine the source database:
```json
{
"questions": [
{
"question": "Which database do you want to migrate to ScalarDB?",
"header": "Database",
"options": [
{"label": "Oracle", "description": "Migrate Oracle schema to ScalarDB"},
{"label": "MySQL", "description": "Migrate MySQL schema to ScalarDB"},
{"label": "PostgreSQL", "description": "Migrate PostgreSQL schema to ScalarDB"}
],
"multiSelect": false
}
]
}
```
Save the user's response.
---
### STEP 2: Delegate to the Database-Specific Skill
Based on the user's selection, invoke the corresponding skill using the `Skill` tool:
| User Selection | Skill to Invoke |
|----------------|-----------------|
| **Oracle** | `Skill: architect:migrate-oracle` |
| **MySQL** | `Skill: architect:migrate-mysql` |
| **PostgreSQL** | `Skill: architect:migrate-postgresql` |
The delegated command handles the entire workflow autonomously:
**Phase A: Interactive Configuration (Steps 1-6) — Main Context**
1. Reads or detects missing `.claude/configuration/databases.env`
2. Collects connection parameters (Batch 1 of 2) via `AskUserQuestion`
3. Collects authentication & options (Batch 2 of 2) via `AskUserQuestion`
4. Maps user responses to configuration values
5. Writes or updates `databases.env`
6. Ensures output directory exists
**Phase B: Subagent Processing — Isolated Contexts**
*Oracle (Steps 7-11 — 6 subagents):*
| Step | Subagent | Type | What It Does |
|------|----------|------|--------------|
| 7 | Connection Tester | Bash | Verifies DB is reachable via SQL*Plus |
| 8 | Schema Extractor | Bash | Runs `oracle_db_extractor.py` |
| 9 | Report Generator | general-purpose | Reads JSON + template, writes schema report |
| 10 | Migration Analyst + AQ Migrator + SP/Trigger Migrator | general-purpose ×3 | Parallel: migration docs + AQ Java code + SP/trigger Java code |
| 11 | *(main context)* | — | Displays combined summary + metrics table |
*MySQL / PostgreSQL (Steps 7-11 — 5 subagents):*
| Step | Subagent | Type | What It Does |
|------|----------|------|--------------|
| 7 | Connection Tester | Bash | Verifies DB is reachable via Python connector |
| 8 | Schema Extractor | Bash | Runs `*_db_extractor.py` |
| 9 | Report Generator | general-purpose | Reads JSON + template, writes schema report |
| 10 | Migration Analyst + SP Migrator | general-purpose x2 | Parallel: migration docs + Java code |
| 11 | *(main context)* | — | Displays combined summary |
Error cascading applies: if any subagent fails, later subagents are not spawned.
Perform no further steps after invoking the skill: the delegated command produces the final output, and anything added here would repeat or contradict it.
---
### STEP 3: Error Handling
- **User selects "Other" with an unrecognized database type:**
Inform the user: "Currently, only Oracle, MySQL, and PostgreSQL are supported for ScalarDB migration. Please choose one of the three supported databases."
Then re-ask the question from Step 1.
- **User cancels or does not respond:**
Stop execution and inform the user they can restart with `/architect:migrate-database` or use a direct command (`/architect:migrate-oracle`, `/architect:migrate-mysql`, `/architect:migrate-postgresql`).
---
## Related Commands
| Command | Description |
|---------|-------------|
| `/architect:migrate-oracle` | Direct Oracle migration (skips database selection) |
| `/architect:migrate-mysql` | Direct MySQL migration (skips database selection) |
| `/architect:migrate-postgresql` | Direct PostgreSQL migration (skips database selection) |
## Related Files
- **Config**: `.claude/configuration/databases.env`
- **Output**: `.claude/output/` (generated reports)
- **Subagent Prompts**: `${CLAUDE_PLUGIN_ROOT}/skills/common/subagents/{oracle,mysql,postgresql}/`
Versions
The database has no other skills named migrate-database.
Database snapshot: 13.11.2026 · package version d4da8ce8bf81 (SHA-256 digest of the entire package)
Downloads in the last 30 days: 0 · ranking
Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.
Similar skills
- 84design-scalardb
Design ScalarDB schema, transaction boundaries, and storage backend. For ScalarDB projects only. Do NOT use for projects not using ScalarDB (use /architect:design-data-layer instead). - 100generating-stored-procedures
Use when you need to generate, validate, or deploy stored procedures for PostgreSQL, MySQL, or SQL Server. Creates database functions, triggers, and procedures with proper error handling and transaction management. Trigger with phrases like "generate stored procedure", "create… - 84local-env
Generate docker-compose.yml and setup commands for a local ScalarDB development environment. Use when the user wants to run or test ScalarDB locally, set up a dev backend (PostgreSQL/MySQL/Cassandra/DynamoDB local), or asks "how do I try ScalarDB on my machine". - 100database-design
Database schema design, optimization, and migration patterns for PostgreSQL, MySQL, and NoSQL databases. Use for designing schemas, writing migrations, or optimizing queries. - 100planning-oracle-to-postgres-migration-integration-testing
Creates an integration testing plan for .NET data access artifacts during Oracle-to-PostgreSQL database migrations. Analyzes a single project to identify repositories, DAOs, and service layers that interact with the database, then produces a structured testing plan. Use when… - 90database-engineer
Database architecture design, schema optimization, query performance tuning, and data migration. Handles PostgreSQL, MySQL, MongoDB, Redis. Use when user asks to design database, optimize queries, create migrations, or improve database performance. Do NOT use for frontend or application logic.