Fix leads API null handling

This commit is contained in:
root
2026-02-24 11:37:20 +00:00
parent 6e7f30b514
commit 247eeb9597
3 changed files with 23 additions and 19 deletions
+9
View File
@@ -0,0 +1,9 @@
-- Add missing columns to existing leads table
ALTER TABLE leads ADD COLUMN IF NOT EXISTS source TEXT;
ALTER TABLE leads ADD COLUMN IF NOT EXISTS email TEXT;
-- Add sample leads
INSERT INTO leads (name, business_name, phone, status, source) VALUES
('Juan', 'Restaurante La Niña', '+34 952 449 193', 'new', 'cold_call'),
('Maria', 'Restaurante Trocadero', '+34 681 142 944', 'new', 'cold_call'),
('Carlos', 'Restaurant No7', '+34 655 036 827', 'new', 'cold_call');