INSERT INTO public.uprova (
    application_key,
    application_timestamp,
    educationlevel,
    employmentstatus,
    lengthatbank,
    lengthatjob,
    ownhome,
    payfrequency,
    monthsatresidence,
    state,
    zip
)
VALUES (
    $application_key,
    $application_timestamp,
    $educationlevel,
    $employmentstatus,
    $lengthatbank,
    $lengthatjob,
    $ownhome,
    $payfrequency,
    $monthsatresidence,
    $state,
    $zip
)
ON CONFLICT (application_key)
DO UPDATE
SET
    application_timestamp = EXCLUDED.application_timestamp,
    educationlevel        = EXCLUDED.educationlevel,
    employmentstatus      = EXCLUDED.employmentstatus,
    lengthatbank          = EXCLUDED.lengthatbank,
    lengthatjob           = EXCLUDED.lengthatjob,
    ownhome               = EXCLUDED.ownhome,
    payfrequency          = EXCLUDED.payfrequency,
    monthsatresidence     = EXCLUDED.monthsatresidence,
    state                 = EXCLUDED.state,
    zip                   = EXCLUDED.zip;

