-- ============================================
-- VetNet: Role Cleanup & Normalization
-- Run in phpMyAdmin → SQL tab
-- ============================================

-- 1. Merge pet_owner + farm_owner → client
UPDATE baitari_users 
SET role = 'client' 
WHERE role IN ('pet_owner', 'farm_owner');

-- 2. Check all current roles
SELECT id, name, phone, role, created_at
FROM baitari_users 
ORDER BY created_at DESC;

-- 3. If a specific user has wrong role, fix manually:
-- UPDATE baitari_users SET role = 'client' WHERE name = 'سارة بن علي';
-- UPDATE baitari_users SET role = 'client' WHERE phone = '0661112233';
