mirror of
https://github.com/Dvorinka/MyClubServer.git
synced 2026-06-05 03:02:56 +00:00
dev day #69
This commit is contained in:
@@ -0,0 +1,7 @@
|
||||
-- Set default role to 'fan' and backfill existing records
|
||||
ALTER TABLE IF EXISTS users ALTER COLUMN role SET DEFAULT 'fan';
|
||||
|
||||
-- Backfill NULL/empty/user -> fan (do not touch admin/editor)
|
||||
UPDATE users
|
||||
SET role = 'fan'
|
||||
WHERE role IS NULL OR btrim(role) = '' OR lower(role) = 'user';
|
||||
Reference in New Issue
Block a user