       )
 
     upsert_query =
-      from(
-        p in Price,
-        where: fragment("p0.lmt < EXCLUDED.lmt"),
-        update: [
-          set: [
-            cash: fragment("EXCLUDED.cash"),
-            credit: fragment("EXCLUDED.credit"),
-            trek: fragment("EXCLUDED.trek"),
-            lmu: fragment("EXCLUDED.lmu"),
-            lmt: fragment("EXCLUDED.lmt")
-          ]
-        ]
-      )
+      Price
+      |> where([u], u.lmt < fragment("EXCLUDED.lmt"))
+      |> custom_on_conflict_update_replace_all()
 
     rows =
       upsert_records(

    end
  end

  # PRODUCTS
  defp import_products(ctx, _dbf, false), do: {:ok, ctx}


      )

    upsert_query =
      Pdc
      |> where([u], u.lmt < fragment("EXCLUDED.lmt"))
      |> custom_on_conflict_update_replace_all()

    rows = upsert_records(Pdc, records, upsert_query, :id)

