mirror of
https://github.com/LemmyNet/lemmy
synced 2024-11-22 12:33:09 +00:00
18 lines
309 B
MySQL
18 lines
309 B
MySQL
|
ALTER TABLE local_site
|
||
|
ADD COLUMN enable_nsfw boolean NOT NULL DEFAULT FALSE;
|
||
|
|
||
|
UPDATE
|
||
|
local_site
|
||
|
SET
|
||
|
enable_nsfw = CASE WHEN site.content_warning IS NULL THEN
|
||
|
FALSE
|
||
|
ELSE
|
||
|
TRUE
|
||
|
END
|
||
|
FROM
|
||
|
site
|
||
|
WHERE
|
||
|
-- only local site has private key
|
||
|
site.private_key IS NOT NULL;
|
||
|
|