From 631e60376c3ce650e819ea909bd64ebc2f3922b0 Mon Sep 17 00:00:00 2001 From: Marco Gallegos Date: Fri, 16 Jan 2026 11:01:46 -0600 Subject: [PATCH] =?UTF-8?q?fix:=20Corregir=20error=20SQL=20en=20migraci?= =?UTF-8?q?=C3=B3n=20de=20Telegram?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Corregir uso de INTO en SELECT con múltiples columnas - La migración de Telegram se ejecutó correctamente - Campos de scoring agregados: performance_score, total_bookings_completed, etc. - Funciones de scoring implementadas: update_staff_performance_score(), get_top_performers() - Triggers automáticos para notificaciones de Telegram --- supabase/migrations/20260116030000_telegram_integration.sql | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/supabase/migrations/20260116030000_telegram_integration.sql b/supabase/migrations/20260116030000_telegram_integration.sql index 6ec5f3c..66476b5 100644 --- a/supabase/migrations/20260116030000_telegram_integration.sql +++ b/supabase/migrations/20260116030000_telegram_integration.sql @@ -226,8 +226,9 @@ BEGIN -- Contar garantías procesadas (simulamos por bookings de servicios con garantía) -- En un sistema real, esto vendría de una tabla de garantías SELECT - COUNT(*) INTO v_guarantees_count, - COALESCE(SUM(b.total_amount * 0.1), 0) INTO v_guarantees_amount + COUNT(*), + COALESCE(SUM(b.total_amount * 0.1), 0) + INTO v_guarantees_count, v_guarantees_amount FROM bookings b JOIN services s ON s.id = b.service_id WHERE b.staff_id = p_staff_id