ワンクリックで
rename-sql-table
TRIGGER when user asks to rename the database table used by a SQL CRUD microservice.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
メニュー
TRIGGER when user asks to rename the database table used by a SQL CRUD microservice.
Codex または Claude でインストール この Prompt をコピーして Codex、Claude、または他のアシスタントに貼り付けると、Skill ページを確認してインストールできます。
SOC 職業分類に基づく
TRIGGER when the user asks to upgrade the project to a newer or the latest version of Microbus, or to update the framework. Each Microbus release ships this one self-contained skill; it applies that release's single-version migration, then chains to the next release's copy of this skill until the target version is reached.
TRIGGER when user asks to create, scaffold, or initialize a new microservice.
How to choose the hostname of a new Microbus microservice. Referenced by the add-microservice and add-sql-microservice scaffolding skills (and, through their delegation to add-microservice, by add-python-microservice and import-openapi-microservice). Consult it whenever a microservice's hostname is being chosen.
Performs an architectural review of a microservice-based system built on the Microbus framework. Covers only cross-cutting, cross-microservice concerns - service boundaries, the dependency graph, coupling, cross-service consistency, data ownership, workflow composition, edge security, and system operations. Anything judgeable inside a single microservice directory belongs to the review-microservice skill and is out of scope here. Produces a structured report with findings and recommendations.
Reviews the microservices touched by a set of changes - by default the whole current feature branch versus its merge-base with main, plus any uncommitted work. Runs the review-microservice skill on each changed microservice and the review-architecture skill scoped to those microservices and their graph neighbors, then consolidates one report. Use before merging a branch or before committing working-tree changes.
Performs a thorough review of a single Microbus microservice. Checks for completeness, framework compliance, code quality, security, test coverage, documentation, API design, and data access performance. Produces a structured report with findings and recommendations.
| name | rename-sql-table |
| description | TRIGGER when user asks to rename the database table used by a SQL CRUD microservice. |
CRITICAL: Read and analyze this microservice before starting. Do NOT explore or analyze other microservices unless explicitly instructed to do so. The instructions in this skill are self-contained to this microservice.
IMPORTANT: old_table_name and new_table_name are placeholders for the actual old and new table names.
Copy this checklist and track your progress:
Renaming the database table:
- [ ] Step 1: Update Table Name Const
- [ ] Step 2: Update Database Schema
- [ ] Step 3: Housekeeping
Update the tableName const in service.go to the new table name. Do NOT change the sequenceName.
const (
tableName = "new_table_name"
sequenceName = "old_table_name@0f7ce540" // Do not change
// ...
)
Create a new migration script file in resources/sql with an incremental file name. IMPORTANT: Do not edit an existing migration file.
-- DRIVER: mysql
RENAME TABLE old_table_name TO new_table_name;
-- DRIVER: pgx
ALTER TABLE old_table_name RENAME TO new_table_name;
-- DRIVER: mssql
EXEC sp_rename 'old_table_name', 'new_table_name';
Refer to the older .sql migration files to identify what if any indices were associated with the old table name. Append statements to the migration script to rename these indices, replacing the old table name with the new one.
-- DRIVER: mysql
ALTER TABLE new_table_name RENAME INDEX old_table_name_idx_field TO new_table_name_idx_field;
-- DRIVER: pgx
ALTER INDEX old_table_name_idx_field RENAME TO new_table_name_idx_field;
-- DRIVER: mssql
EXEC sp_rename 'old_table_name_idx_field', 'new_table_name_idx_field', 'INDEX';
Follow the housekeeping skill. Renaming the SQL table changes only the hand-written service.go column mappings and resources/sql migrations, not definition.go, so the boilerplate regeneration is a no-op; the Version bump and go vet still apply.