mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-05 04:00:02 +00:00
17 lines
245 B
MySQL
17 lines
245 B
MySQL
|
ALTER TABLE local_user
|
||
|
ADD COLUMN admin boolean DEFAULT FALSE NOT NULL;
|
||
|
|
||
|
UPDATE
|
||
|
local_user
|
||
|
SET
|
||
|
admin = TRUE
|
||
|
FROM
|
||
|
person
|
||
|
WHERE
|
||
|
local_user.person_id = person.id
|
||
|
AND person.admin;
|
||
|
|
||
|
ALTER TABLE person
|
||
|
DROP COLUMN admin;
|
||
|
|