creating-oracle-to-postgres-master-migration-plan
Compare original and translation side by side
🇺🇸
Original
English🇨🇳
Translation
ChineseCreating an Oracle-to-PostgreSQL Master Migration Plan
生成Oracle到PostgreSQL主迁移计划
Analyze a .NET solution, classify every project for Oracle→PostgreSQL migration eligibility, and write a structured plan that downstream agents and skills can parse.
分析.NET解决方案,为每个项目进行Oracle→PostgreSQL迁移可行性分类,并生成可供下游Agent和Skill解析的结构化计划。
Workflow
工作流程
Progress:
- [ ] Step 1: Discover projects in the solution
- [ ] Step 2: Classify each project
- [ ] Step 3: Confirm with user
- [ ] Step 4: Write the plan fileStep 1: Discover projects
Find the Solution File (it has a or extension) in the workspace root (ask the user if multiple exist). Parse it to extract all project references. For each project, note the name, path, and type (class library, web API, console, test, etc.).
.sln.slnx.csprojStep 2: Classify each project
Scan every non-test project for Oracle indicators:
- NuGet references: ,
Oracle.ManagedDataAccess(checkOracle.EntityFrameworkCoreand.csproj)packages.config - Config entries: Oracle connection strings in ,
appsettings.json,web.configapp.config - Code usage: ,
OracleConnection,OracleCommandOracleDataReader - DDL cross-references under (if present)
.github/oracle-to-postgres-migration/DDL/Oracle/
Assign one classification per project:
| Classification | Meaning |
|---|---|
| MIGRATE | Has Oracle interactions requiring conversion |
| SKIP | No Oracle indicators (UI-only, shared utility, etc.) |
| ALREADY_MIGRATED | A |
| TEST_PROJECT | Test project; handled by the testing workflow |
Step 3: Confirm with user
Present the classified list. Let the user adjust classifications or migration ordering before finalizing.
Step 4: Write the plan file
Save to:
.github/oracle-to-postgres-migration/Reports/Master Migration Plan.mdUse this exact template — downstream consumers depend on the structure:
markdown
undefined进度:
- [ ] 步骤1:发现解决方案中的项目
- [ ] 步骤2:对每个项目进行分类
- [ ] 步骤3:与用户确认
- [ ] 步骤4:编写计划文件步骤1:发现项目
在工作区根目录中找到解决方案文件(扩展名为或,若存在多个请询问用户)。解析文件以提取所有项目引用。为每个项目记录名称、路径和类型(类库、Web API、控制台应用、测试项目等)。
.sln.slnx.csproj步骤2:对每个项目进行分类
扫描所有非测试项目,查找Oracle相关标识:
- NuGet引用:、
Oracle.ManagedDataAccess(检查Oracle.EntityFrameworkCore和.csproj文件)packages.config - 配置项:、
appsettings.json、web.config中的Oracle连接字符串app.config - 代码使用:、
OracleConnection、OracleCommandOracleDataReader - DDL交叉引用:目录下的相关文件(若存在)
.github/oracle-to-postgres-migration/DDL/Oracle/
为每个项目分配以下分类之一:
| 分类 | 含义 |
|---|---|
| MIGRATE(需要迁移) | 存在需要转换的Oracle交互逻辑 |
| SKIP(跳过) | 无Oracle相关标识(仅UI、共享工具等) |
| ALREADY_MIGRATED(已迁移) | 存在带 |
| TEST_PROJECT(测试项目) | 测试项目;由测试工作流单独处理 |
步骤3:与用户确认
展示分类后的项目列表,允许用户在最终确定前调整分类结果或迁移顺序。
步骤4:编写计划文件
保存至:
.github/oracle-to-postgres-migration/Reports/Master Migration Plan.md请严格使用以下模板——下游依赖方依赖该结构进行解析:
markdown
undefinedMaster Migration Plan
主迁移计划
Solution: {solution file name}
Solution Root: {REPOSITORY_ROOT}
Created: {timestamp}
Last Updated: {timestamp}
解决方案: {solution file name}
解决方案根目录: {REPOSITORY_ROOT}
创建时间: {timestamp}
最后更新时间: {timestamp}
Solution Summary
解决方案摘要
| Metric | Count |
|---|---|
| Total projects in solution | {n} |
| Projects requiring migration | {n} |
| Projects already migrated | {n} |
| Projects skipped (no Oracle usage) | {n} |
| Test projects (handled separately) | {n} |
| 指标 | 数量 |
|---|---|
| 解决方案中项目总数 | {n} |
| 需要迁移的项目数 | {n} |
| 已完成迁移的项目数 | {n} |
| 跳过的项目数(无Oracle依赖) | {n} |
| 测试项目数(单独处理) | {n} |
Project Inventory
项目清单
| # | Project Name | Path | Classification | Notes |
|---|---|---|---|---|
| 1 | {name} | {relative path} | MIGRATE | {notes} |
| 2 | {name} | {relative path} | SKIP | No Oracle dependencies |
| 序号 | 项目名称 | 路径 | 分类 | 备注 |
|---|---|---|---|---|
| 1 | {name} | {relative path} | MIGRATE | {notes} |
| 2 | {name} | {relative path} | SKIP | 无Oracle依赖项 |
Migration Order
迁移顺序
- {ProjectName} — {rationale, e.g., "Core data access library; other projects depend on it."}
- {ProjectName} — {rationale}
Order projects so that shared/foundational libraries are migrated before their dependents.- {ProjectName} — {理由,例如:"核心数据访问库;其他项目依赖于此。"}
- {ProjectName} — {理由}
迁移顺序需遵循:先迁移共享/基础类库,再迁移依赖它们的项目。