-- Add role column to users table ALTER TABLE users ADD COLUMN role VARCHAR(20) NOT NULL DEFAULT 'user'; -- Set first user as admin (if any) UPDATE users SET role = 'admin' WHERE id = (SELECT id FROM users ORDER BY created_at ASC LIMIT 1);