- Implement upsert logic in import_phone() function - Check for existing (id, phone) combinations before insert - Track duplicates within CSV to skip gracefully - Update existing records instead of failing on duplicates - Add detailed statistics: inserted, updated, skipped counts - Align with upsert pattern used in other import functions - Add documentation in docs/PHONE_IMPORT_FIX.md Fixes: UNIQUE constraint failed: phone.id, phone.phone error when re-importing or uploading CSV with duplicate entries
152 B
152 B
| 1 | Empl_Num | Empl_Id | Rate_Per_Hour |
|---|---|---|---|
| 2 | 0 | UNASSIGNED | 200.00 |
| 3 | 1 | MUELLER\JS | 200.00 |
| 4 | 2 | HABICH\RA | 200.00 |
| 5 | 3 | GUETTEL\SR | 200.00 |
| 6 | 4 | BENDT\D | 200.00 |
| 7 | 5 | BENDT\LF | 200.00 |