mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-25 13:51:19 +00:00
Nutomic
f05afead02
* Remove endpoints for individual community/user inboxes fixes #4147 fixes #3928 * Remove shared_inbox_url columns * fmt
33 lines
636 B
SQL
33 lines
636 B
SQL
-- replace value of inbox_url with shared_inbox_url and the drop shared inbox
|
|
UPDATE
|
|
person
|
|
SET
|
|
inbox_url = subquery.inbox_url
|
|
FROM (
|
|
SELECT
|
|
id,
|
|
coalesce(shared_inbox_url, inbox_url) AS inbox_url
|
|
FROM
|
|
person) AS subquery
|
|
WHERE
|
|
person.id = subquery.id;
|
|
|
|
ALTER TABLE person
|
|
DROP COLUMN shared_inbox_url;
|
|
|
|
UPDATE
|
|
community
|
|
SET
|
|
inbox_url = subquery.inbox_url
|
|
FROM (
|
|
SELECT
|
|
id,
|
|
coalesce(shared_inbox_url, inbox_url) AS inbox_url
|
|
FROM
|
|
community) AS subquery
|
|
WHERE
|
|
community.id = subquery.id;
|
|
|
|
ALTER TABLE community
|
|
DROP COLUMN shared_inbox_url;
|
|
|