Add migration to mark local communities as such (#3257)

pull/3305/head
kartikynwa 2023-06-22 17:22:31 +05:30 committed by GitHub
parent 08e25d0e63
commit 4f2fb68d6b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 0 deletions

View File

@ -0,0 +1,2 @@
-- Add a no-op statement to prevent `diesel migration redo` errors
SELECT 1;

View File

@ -0,0 +1,5 @@
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;