mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-12-29 14:21:34 +00:00
Nutomic
6454a4d43d
* Remove `local_site.enable_nsfw` in favor of `site.content_warning` (fixes #4627) * cleanup usage of SiteView::read_local * test * uppercase
17 lines
309 B
SQL
17 lines
309 B
SQL
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;
|
|
|