[Fix] User States
This commit is contained in:
parent
727bb987c4
commit
c447e6e863
16 changed files with 2582 additions and 370 deletions
22
migrations/004_presence_preference.sql
Normal file
22
migrations/004_presence_preference.sql
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
ALTER TABLE users
|
||||
ADD COLUMN presence_preference VARBINARY(32) NOT NULL DEFAULT 'user_online';
|
||||
|
||||
UPDATE users
|
||||
SET presence_preference = 'user_online'
|
||||
WHERE presence_preference NOT IN (
|
||||
'user_online',
|
||||
'user_idle',
|
||||
'user_dnd',
|
||||
'user_wc',
|
||||
'user_invisible'
|
||||
);
|
||||
|
||||
ALTER TABLE users
|
||||
ADD CONSTRAINT chk_users_presence_preference
|
||||
CHECK (presence_preference IN (
|
||||
'user_online',
|
||||
'user_idle',
|
||||
'user_dnd',
|
||||
'user_wc',
|
||||
'user_invisible'
|
||||
));
|
||||
Loading…
Reference in a new issue