23 lines
683 B
SQL
23 lines
683 B
SQL
-- Create leads table
|
|
CREATE TABLE IF NOT EXISTS leads (
|
|
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
user_id TEXT DEFAULT 'default',
|
|
name TEXT NOT NULL,
|
|
business_name TEXT,
|
|
phone TEXT,
|
|
email TEXT,
|
|
source TEXT,
|
|
status TEXT DEFAULT 'new',
|
|
notes TEXT,
|
|
created_at TIMESTAMPTZ DEFAULT NOW()
|
|
);
|
|
|
|
-- Disable RLS
|
|
ALTER TABLE leads DISABLE ROW LEVEL SECURITY;
|
|
|
|
-- 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');
|