
UPDATE commerce.cotizaciones
SET folio_cotizacion = id_cotizacion::text,
    updated_at = NOW()
WHERE soft_delete IS NOT TRUE
  AND COALESCE(NULLIF(BTRIM(folio_cotizacion), ''), '') IS DISTINCT FROM id_cotizacion::text;

ANALYZE commerce.cotizaciones;
