turash/bugulma/backend/scripts/fix-admin-role.sql

19 lines
462 B
SQL

-- Script to update a user's role to admin
-- Usage: Replace 'user@example.com' with the actual email of the user you want to make admin
-- Option 1: Update by email
UPDATE users
SET role = 'admin'
WHERE email = 'user@example.com';
-- Option 2: Update by user ID (if you know the ID)
-- UPDATE users
-- SET role = 'admin'
-- WHERE id = 'user-id-here';
-- Verify the update
SELECT id, email, name, role, is_active
FROM users
WHERE email = 'user@example.com';