You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
lemmy/migrations/2023-06-22-051755_fix_local.../up.sql

12 lines
166 B
SQL

UPDATE
community c
SET
local = TRUE
FROM
local_site ls
JOIN site s ON ls.site_id = s.id
WHERE
c.instance_id = s.instance_id
AND NOT c.local;