Agent skill · github
migrating-oracle-to-postgres-data-access-code
Migrates .NET/C# data access code from Oracle to PostgreSQL (Npgsql). Replaces Oracle NuGet packages, rewrites OracleConnection/OracleCommand/OracleDataReader usage, fixes DbType mappings, updates stored procedure invocation patterns, and adapts connection string configuration. Use when migrating the application code layer of a .NET project during an Oracle-to-PostgreSQL database migration.
What it needs
About 4k tokens when loaded.
What this skill does
Migrating .NET Data Access Code from Oracle to PostgreSQL Migrate the C# data access layer of a single .Postgres-copy project from Oracle (Oracle.ManagedDataAccess) to PostgreSQL (Npgsql). Work item by item through Reports/{ProjectName}/MigrationChecklist.md. Prerequisites The .Postgres project copy exists (created in Phase 5 setup). Reports/{ProjectName}/MigrationChecklist.md exists and is the source of truth for what to change. Reports/{ProjectName}/OracleRiskAnalysis.md exists for cross-referencing behavioral differences. Workflow Step 1: Replace NuGet packages In the .csproj of the .Postgres project: Remove: Oracle.ManagedDataAccess.Core, Oracle.EntityFrameworkCore (and any other Oracle. packages) Add: Npgsql (for ADO.NET) and/or Npgsql.EntityFrameworkCore.PostgreSQL (for EF Core) Keep version pinning consistent with the target .NET version; do not introduce newer package versions than what the solution already uses for similar packages. If System.Data abstractions (IDbConnection, IDbCommand) are used project-wide, the surface-level code may need fewer changes — identify them first. Step 2: Update connection string configuration Locate the Oracle connection string in appsettings.json, appsettings.{env}.json, web.config, app.config, or environment variable configuration. Replace with a Npgsql-compatible connection string: Host=localhost;Port=5432;Database=mydb;Username=myuser;Password=mypassword Do not hardcode credentials — use the same configuration mechanism already in use (e.g., environment variables, secrets manager, IConfiguration). Update any named connection string keys only if they were Oracle-specific (e.g., OracleConnection). Prefer keeping the same key name to minimize application config changes. …
How to use it
Reference it in AdaL, Claude Code, Cursor or any coding agent — nothing to install:
@skills github/migrating-oracle-to-postgres-data-access-code