-- Add missing columns to crawl_sessions table that the API expects
-- Add total_urls and processed_urls columns that the API is trying to insert
ALTER TABLE crawl_sessions ADD COLUMN IF NOT EXISTS total_urls INTEGER DEFAULT 0;
ALTER TABLE crawl_sessions ADD COLUMN IF NOT EXISTS processed_urls INTEGER DEFAULT 0;

-- Refresh schema cache to pick up new columns
NOTIFY pgrst, 'reload schema';

