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,26 @@
|
||||
Identifier,Query
|
||||
AGE,Age (31)?
|
||||
COUNTY_OF_RES,County of residence/practice?
|
||||
EDUCATION,Highest grade completed?
|
||||
EMPLOYED_AS,Occupation?
|
||||
EMPLOYER_A1,Employer's street address - 1st line?
|
||||
EMPLOYER_A2,Employer's street address - 2nd line?
|
||||
EMPLOYER_CSZ,"Employer's city, state and zip code?"
|
||||
EMPLOYER_NAME,Name of Employer?
|
||||
FIRM_NAME,Name of law office?
|
||||
GENDER,"Gender (Male, Female)?"
|
||||
HE/SHE,He or she for subject?
|
||||
HIM/HER,Him or her for subject?
|
||||
HIS/HER,His or her for subject?
|
||||
INITS,Initials (WJS)?
|
||||
LCEP,Life Cycle Earnings Pattern Age Category?
|
||||
LE,Life expectancy (22.4)?
|
||||
NOT_EXPIRES,"Notary's comm. (is permanent,expires on ##/##/##)?"
|
||||
NOT_NAME,Notary's full name (Bob E. Smith)?
|
||||
NOT_ST,Notary's state of commission (Wisconsin)?
|
||||
POSS_FORM,"Possessive form of subject's last name (','s)?"
|
||||
RACE,Subject's race (White)?
|
||||
SB#,State Bar Number?
|
||||
SEC_INITS,Secretary's Initials (ih)?
|
||||
SEC_NAME,Secretary's full name (Irene Holly)?
|
||||
WLE,Worklife expectancy (13.5)?
|
||||
|
Reference in New Issue
Block a user