ekzyis fa4f09ddca
Territory notifications for everyone (#870)
* Territory notifications

* Migrate old setting to new table

* Auto subscribe founders to their territories on creation

* Fix (un)subscribe not shown to founder

* Rename to toggleSubSubscription

* Fix inconsistency between toggleSubSubscription and toggleMuteSub

* Add dedicated button in header for following territories

* Don't drop noteTerritoryPosts column

* Fix db dip in Sub.meSubscription resolver

* Move territory subscribe to new territory context menu

* Decrease space between share icon and mute button

* Fix eslint
2024-02-23 09:12:49 -06:00

8 lines
358 B
SQL

-- migrate values from founders which had notifications for territory posts enabled to new table
INSERT INTO "SubSubscription"("userId", "subName")
SELECT u.id, s.name
FROM users u JOIN "Sub" s ON u.id = s."userId"
WHERE "noteTerritoryPosts";
-- we don't drop the users.noteTerritoryPosts column in this migration since it's a backwards incompatible change