creating-oracle-to-postgres-master-migration-plan

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Creating 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 file
Step 1: Discover projects
Find the Solution File (it has a
.sln
or
.slnx
extension) in the workspace root (ask the user if multiple exist). Parse it to extract all
.csproj
project references. For each project, note the name, path, and type (class library, web API, console, test, etc.).
Step 2: Classify each project
Scan every non-test project for Oracle indicators:
  • NuGet references:
    Oracle.ManagedDataAccess
    ,
    Oracle.EntityFrameworkCore
    (check
    .csproj
    and
    packages.config
    )
  • Config entries: Oracle connection strings in
    appsettings.json
    ,
    web.config
    ,
    app.config
  • Code usage:
    OracleConnection
    ,
    OracleCommand
    ,
    OracleDataReader
  • DDL cross-references under
    .github/oracle-to-postgres-migration/DDL/Oracle/
    (if present)
Assign one classification per project:
ClassificationMeaning
MIGRATEHas Oracle interactions requiring conversion
SKIPNo Oracle indicators (UI-only, shared utility, etc.)
ALREADY_MIGRATEDA
-postgres
or
.Postgres
duplicate exists and appears processed
TEST_PROJECTTest 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.md
Use this exact template — downstream consumers depend on the structure:
markdown
undefined
进度:
- [ ] 步骤1:发现解决方案中的项目
- [ ] 步骤2:对每个项目进行分类
- [ ] 步骤3:与用户确认
- [ ] 步骤4:编写计划文件
步骤1:发现项目
在工作区根目录中找到解决方案文件(扩展名为
.sln
.slnx
,若存在多个请询问用户)。解析文件以提取所有
.csproj
项目引用。为每个项目记录名称、路径和类型(类库、Web API、控制台应用、测试项目等)。
步骤2:对每个项目进行分类
扫描所有非测试项目,查找Oracle相关标识:
  • NuGet引用:
    Oracle.ManagedDataAccess
    Oracle.EntityFrameworkCore
    (检查
    .csproj
    packages.config
    文件)
  • 配置项:
    appsettings.json
    web.config
    app.config
    中的Oracle连接字符串
  • 代码使用:
    OracleConnection
    OracleCommand
    OracleDataReader
  • DDL交叉引用:
    .github/oracle-to-postgres-migration/DDL/Oracle/
    目录下的相关文件(若存在)
为每个项目分配以下分类之一:
分类含义
MIGRATE(需要迁移)存在需要转换的Oracle交互逻辑
SKIP(跳过)无Oracle相关标识(仅UI、共享工具等)
ALREADY_MIGRATED(已迁移)存在带
-postgres
.Postgres
后缀的副本且已处理完成
TEST_PROJECT(测试项目)测试项目;由测试工作流单独处理
步骤3:与用户确认
展示分类后的项目列表,允许用户在最终确定前调整分类结果或迁移顺序。
步骤4:编写计划文件
保存至:
.github/oracle-to-postgres-migration/Reports/Master Migration Plan.md
请严格使用以下模板——下游依赖方依赖该结构进行解析:
markdown
undefined

Master Migration Plan

主迁移计划

Solution: {solution file name} Solution Root: {REPOSITORY_ROOT} Created: {timestamp} Last Updated: {timestamp}
解决方案: {solution file name} 解决方案根目录: {REPOSITORY_ROOT} 创建时间: {timestamp} 最后更新时间: {timestamp}

Solution Summary

解决方案摘要

MetricCount
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 NamePathClassificationNotes
1{name}{relative path}MIGRATE{notes}
2{name}{relative path}SKIPNo Oracle dependencies
序号项目名称路径分类备注
1{name}{relative path}MIGRATE{notes}
2{name}{relative path}SKIP无Oracle依赖项

Migration Order

迁移顺序

  1. {ProjectName} — {rationale, e.g., "Core data access library; other projects depend on it."}
  2. {ProjectName} — {rationale}

Order projects so that shared/foundational libraries are migrated before their dependents.
  1. {ProjectName} — {理由,例如:"核心数据访问库;其他项目依赖于此。"}
  2. {ProjectName} — {理由}

迁移顺序需遵循:先迁移共享/基础类库,再迁移依赖它们的项目。