원클릭으로
create-migration
Create versioned SQL migration files for database schema changes, following project conventions
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
메뉴
Create versioned SQL migration files for database schema changes, following project conventions
Codex 또는 Claude로 설치 이 Prompt를 복사해 Codex, Claude 또는 다른 어시스턴트에 붙여 넣으면 Skill 페이지를 검토하고 설치를 진행할 수 있습니다.
SOC 직업 분류 기준
通过微信机器人发送通知消息(文本、图片、文件、视频)
重新生成 Drogon ORM 模型类(基于当前数据库表结构)
构建和测试C++ OAuth2后端,包含正确的依赖管理
重置测试数据库(清空并重新初始化所有表结构和数据)
执行OAuth2系统的完整端到端(E2E)测试,验证用户登录、授权码流程、token交换、RBAC权限控制和受保护API访问的完整功能。当用户需要在代码变更后验证整个OAuth2认证流程、测试用户登录和权限管理、验证修复后的安全功能、或在生产部署前进行完整的功能验证时使用此技能。
在Docker Compose环境中执行OAuth2系统的完整集成测试和健康检查。当用户需要在代码变更后验证功能、运行端到端测试、检查Docker环境健康状态、或需要验证整个OAuth2系统(前端+后端+数据库+缓存)的集成时使用此技能。确保在Docker环境中测试所有组件的集成,包括健康检查、OAuth2流程、API端点、数据库连接、Redis缓存和前后端通信。
| name | create-migration |
| description | Create versioned SQL migration files for database schema changes, following project conventions |
| disable-model-invocation | true |
Create versioned SQL migration files for the OAuth2 database schema.
When adding, modifying, or dropping database tables/columns/indexes. Triggered by /create-migration.
Pattern: OAuth2Server/sql/migrations/V{NNN}__descriptive_name.sql
Current latest: V018__webauthn.sql -- next migration starts at V019.
Check existing migrations before creating:
ls -la OAuth2Server/sql/migrations/
-- Migration: V{NNN}__{description}
-- Created: {date}
-- Purpose: {why this change is needed}
-- === UP ===
-- Forward migration: apply changes
{SQL statements here}
-- === DOWN ===
-- Rollback migration: revert changes
-- (optional but recommended for production)
{ROLLBACK SQL here}
Before finalizing, verify:
V{NNN}__snake_case.sql patternIF NOT EXISTS / IF EXISTS where appropriatemodel.jsonCREATE TABLE IF NOT EXISTS new_table (
id SERIAL PRIMARY KEY,
name VARCHAR(100) NOT NULL,
created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
);
ALTER TABLE existing_table ADD COLUMN IF NOT EXISTS new_column VARCHAR(50);
CREATE INDEX IF NOT EXISTS idx_table_column ON existing_table(column);
ALTER TABLE child_table
ADD CONSTRAINT fk_child_parent
FOREIGN KEY (parent_id) REFERENCES parent_table(id) ON DELETE CASCADE;
/build-and-test or run SchemaManager/orm-genmodel.json if new tables added/openapi-update