Context
Acme's legacy HRMS stores payroll cycles in a single denormalized pay_cycle table with comma-separated employee IDs. We need to migrate ~18 months of history (12 cycles, ~4,200 employees per cycle) into Symphora's normalized schema before go-live on June 15.
Acceptance
- All 12 cycles imported into
payroll.cycleandpayroll.cycle_row - Currency conversion at historical rates (USD → PKR, source:
fx.historical) - Loaded-cost recomputation against current contract data — flag mismatches > ±5%
- Re-runnable as idempotent operation (UPSERT on
cycle_external_id) - QA: random sample of 50 rows match legacy gross + net within ±$1
Schema mapping
| Legacy field | Symphora target | Note |
|---|---|---|
cycle_id | payroll.cycle.external_id | — |
emp_ids (csv) | fan out → payroll.cycle_row | parse, validate FK |
gross_amt | cycle_row.gross_pkr | currency convert if needed |
deductions_blob (json) | cycle_row.deductions[] | schema v2 |
Risks
Duplicate employee rows surfaced in QA (see SYM-455) — likely caused by Acme's CSV re-import process. Waiting on their DBA to confirm canonical IDs.
Worth flagging: the loaded-cost recompute on row 4 (deductions blob v2) is going to be slow if we do it row-by-row at import time. Suggest deferring to a post-import job — design has a card for the cost dashboard that can handle the recompute lazily.