Step 02 of 8 2-3 weeks· advanced
Step 2: Translate the Schema
Map every source object to a target equivalent — types, constraints, indexes, identity columns, computed columns.
Recommended prompts
Use one of these to do the work in your IDE
Open the template to read it in full. Click Copy prompt to grab it (with your stack values pre-filled where they apply) — then paste into Claude Code, Cursor, or wherever you build.
Recommended skills
Drop these into Claude Code for this phase
Skills auto-trigger on the right kind of request. Install once; they apply to every prompt that fits.
Recommended MCP configs
Wire these tools into Claude Code first
MCP servers give Claude Code direct access to external systems (Jira, browsers, databases). Configure once.
When you're done
Verify these in your own work before moving on
This is a checklist for you to mentally tick off in your repo and IDE — the site doesn't track it, you do.
- Type mapping table (every source type → target type)
- Schema migration script generated
- Constraint translation documented (especially defaults using engine-specific functions like GETDATE() vs now())
- Identity columns translated (SQL Server IDENTITY → Postgres GENERATED AS IDENTITY or SERIAL)
- Computed columns translated (SQL Server PERSISTED → Postgres GENERATED ALWAYS STORED)
- Indexes translated (with attention to clustered indexes — no equivalent in Postgres)
- Validation queries written (run on both DBs once schema is in place)
Common pitfalls
What goes wrong at this step
- Datetime confusion — SQL Server datetime (no tz) → Postgres timestamptz (always UTC) is a behavior change; affects every app touching dates
- Decimal precision drift — money type → numeric(19,4) is precision-equal but type-different; app code may break
- Clustered index loss — Postgres has no clustered indexes; query patterns may change behavior
- Missing Postgres-specific opportunities — JSONB, arrays, partial indexes are usable where they fit