Fix PHONE.csv import duplicate constraint error
- 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
This commit is contained in:
@@ -0,0 +1,88 @@
|
||||
T_Code,T_Type,T_Type_L,Amount,Description
|
||||
ADD,2,H,,Additional Analysis
|
||||
AIR,4,D,,Airfare
|
||||
APP,2,H,,Appearance in Court
|
||||
ATT,2,H,,Attendance at Trial
|
||||
CERT,3,F,75.00,Certification of QDRO and Service Upon Plan Administrator
|
||||
COAH,3,F,175.00,Drafting of Court Order Acceptable for Processing (One-half of fee)
|
||||
COAP,3,F,500.00,Drafting of Court Order Acceptable for Processing
|
||||
CON,2,H,,Consultation
|
||||
COPY,3,F,,Copying
|
||||
CRE,5,C,,Credit Toward Outstanding Balance
|
||||
CSRS,3,F,150.00,Valuation of Civil Service Retirement System Benefits
|
||||
DBPV,3,F,120.00,Defined Benefit Plan Valuation
|
||||
DCPV,3,F,75.00,Defined Contribution Plan Valuation
|
||||
DEP,3,F,,Deposition Testimony
|
||||
DOC,2,H,,Document Review and Analysis
|
||||
DPA,3,F,500.00,Drafting of Deferred Payment Agreement
|
||||
DRA,2,H,,Draft Correspondence
|
||||
DRO,3,F,400.00,Drafting of Domestic Relations Order
|
||||
DROH,3,F,125.00,Drafting of Domestic Relations Order (One-half of fee)
|
||||
ENH,2,H,1200.00,Enhancement to Earning Capacity Analysis
|
||||
ENL,4,D,,Cost of Enlarging Exhibits
|
||||
ERN,2,H,1200.00,Present Value of Earning Capacity Analysis
|
||||
ESOP,3,F,50.00,Employee Stock Ownership Plan Valuation
|
||||
EXH,2,H,,Preparation of Exhibits
|
||||
FAX,4,D,,Facsimile Services (FAX)
|
||||
FERS,3,F,150.00,Valuation of Federal Employees Retirement System Benefits
|
||||
FFPV,3,F,,Flat Fee Present Value Calculation
|
||||
FRED,5,C,,Fee Reduction (Credit for reduction in standard fee)
|
||||
FWO,5,C,,Fee Write Off
|
||||
GOVT,3,F,150.00,Valuation of Government Sponsored Defined Benefit Plan
|
||||
INT,3,F,,Interest on Past Due Balance
|
||||
IRAT,3,F,400.00,Transfer Order for IRA
|
||||
LEC,3,F,,Lost Earning Capacity Analysis and Report
|
||||
LOI,3,F,200.00,Letter of Instruction to Divide IRA
|
||||
MAIN,3,F,200.00,Present Value of Maintenance Calculation
|
||||
MIL,4,D,,Mileage
|
||||
MISC,3,F,,Miscellaneous Charges
|
||||
MQCO,3,F,400.00,Drafting of Qualifying Court Order to Divide Military Retired Pay
|
||||
MQOH,3,F,200.00,Drafting of Qualifying Court Order to Divide Military Retired Pay (One-half of fee)
|
||||
MRP,3,F,150.00,Valuation of U.S. Military Retired Pay Pension Benefits
|
||||
MTG,2,H,,Meeting
|
||||
MTGP,2,H,,Preparation Time Prior to Meeting
|
||||
ONCL,3,F,100.00,On Call Fee for Trial Testimony (Non-refundable)
|
||||
PCA,5,C,,Professional Courtesy Adjustment
|
||||
PEC,2,H,1200.00,Pecuniary Loss Analysis and Report
|
||||
PEN,3,F,80.00,Pension Plan Valuation
|
||||
PMT,5,C,,Payment Received - Thank You.
|
||||
PREP,2,H,,Preparation for Trial Testimony
|
||||
PRO,3,F,50.00,Profit Sharing Plan Valuation
|
||||
PROG,2,H,,Computer Programming Tasks
|
||||
PVC,2,H,,Present Value Calculation
|
||||
QCO,3,F,550.00,Drafting of Qualifying Court Order for Dividing Military Retired Pay Benefits
|
||||
QDBH,3,F,150.00,Drafting of Qualified Domestic Relations Order for Defined Benefit Plan (One-half of fee)
|
||||
QDCH,3,F,125.00,Drafting of Qualified Domestic Relations Order for Defined Contribution Plan (One-half of fee)
|
||||
QDRF,3,F,,Drafting of Qualified Domestic Relations Order(s)
|
||||
QDRH,2,H,,Drafting of Qualified Domestic Relations Order(s)
|
||||
QILD,3,F,400.00,QILDRO
|
||||
QREV,2,H,,Review and Analyze Qualified Domestic Relations Order Draft
|
||||
Q_DB,3,F,450.00,Drafting of Qualified Domestic Relations Order for Defined Benefit Plan
|
||||
Q_DC,3,F,400.00,Drafting of Qualified Domestic Relations Order for Defined Contribution Plan
|
||||
Q_SO,3,F,200.00,Drafting of Qualified Domestic Relations Order for Stock Option Plan
|
||||
RAIL,3,F,100.00,Valuation of U.S. Railroad Retirement Board Retirement Benefits
|
||||
RBCO,3,F,500.00,Retirement Benefit Court Order - Federal Thrift Savings Plan
|
||||
REC,3,F,80.00,Recomputation of Present Value
|
||||
REF,5,C,,Refund of Fee
|
||||
RES,3,F,200.00,Reservation Fee for Trial Testimony (Non-refundable)
|
||||
RET,5,C,,Retainer Received
|
||||
RETN,3,F,300.00,Retainer Required to Commence Work (Non-refundable)
|
||||
REV,2,H,,Review of File and Preparation for Testimony
|
||||
RRAQ,3,F,500.00,Qualified Domestic Relations Order - Railroad Retirement Act
|
||||
SAV,3,F,50.00,Savings Plan Valuation
|
||||
SSB,3,F,250.00,Present Value Analysis of Social Security Benefit
|
||||
STR,3,F,200.00,Structured Settlement Analysis
|
||||
TDEP,3,F,600.00,Testimony (Deposition)
|
||||
TDIV,3,F,400.00,Testimony (Divorce Related)
|
||||
TEL,2,H,,Telephone Conference
|
||||
TEST,3,F,400.00,Testimony
|
||||
TRA,2,H,,Travel Time and/or Expenses
|
||||
TRI,2,H,,Trial Testimony
|
||||
TSPH,3,F,100.00,Retirement Benefit Court Order - Federal Thrift Savings Plan (One-half of fee)
|
||||
TTEL,3,F,200.00,Testimony (via Telephone)
|
||||
TTRI,3,F,800.00,Testimony (Trial)
|
||||
UPD,3,F,50.00,Update of Present Value Calculation
|
||||
W457,3,F,200.00,QDRO for State of Wisconsin 457 Plan
|
||||
WIT,5,C,,Witness Fee Received
|
||||
WRS,3,F,200.00,Valuation of Wisconsin Retirement System Benefits
|
||||
WRSQ,3,F,200.00,QDRO for Wisconsin Retirement System Benefits
|
||||
|
Reference in New Issue
Block a user