mirror of
https://github.com/SamyRai/turash.git
synced 2025-12-26 23:01:33 +00:00
19 lines
462 B
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';
|
|
|