-
-
Notifications
You must be signed in to change notification settings - Fork 889
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add migration to mark local communities as such (#3257)
- Loading branch information
1 parent
08e25d0
commit 4f2fb68
Showing
2 changed files
with
7 additions
and
0 deletions.
There are no files selected for viewing
2 changes: 2 additions & 0 deletions
2
migrations/2023-06-22-051755_fix_local_communities_marked_non_local/down.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-- Add a no-op statement to prevent `diesel migration redo` errors | ||
SELECT 1; |
5 changes: 5 additions & 0 deletions
5
migrations/2023-06-22-051755_fix_local_communities_marked_non_local/up.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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; |