-- Manual Fix Script for InfoSecLabs Duplicate Usernames
-- Run this in phpMyAdmin -> Import or SQL tab

-- 1. Fix duplicate 'daichizan'
UPDATE users SET username = 'daichizan_57' WHERE id = 57;

-- 2. Fix duplicate 'shaimaHamood'
UPDATE users SET username = 'shaimaHamood_91' WHERE id = 91;

-- 3. Fix duplicate 'dai' (if exist, based on email)
-- Checking dump, ID 56 and 57 also share name 'dai' but different emails.
-- Only username field needs to be unique.

-- 4. Apply Unique Index (Safe Mode)
-- If this fails, there are more duplicates.
ALTER TABLE users ADD UNIQUE (username);
