Updating domain change process. Fixes #271 (#272)

* Updating domain change process. Fixes #271

* Adding a few more fields.
This commit is contained in:
Dessalines 2023-09-28 08:46:40 -04:00 committed by GitHub
parent 6b52d62151
commit 8d8796333c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -64,6 +64,14 @@ Get into `psql` for your docker:
`docker-compose exec postgres psql -U lemmy` `docker-compose exec postgres psql -U lemmy`
```sql ```sql
-- Instance
update instance set domain = replace (domain, 'old_domain', 'new_domain');
-- Site
update site set actor_id = replace (actor_id, 'old_domain', 'new_domain');
update site set inbox_url = replace (inbox_url, 'old_domain', 'new_domain');
update site set sidebar = replace (sidebar, 'old_domain', 'new_domain');
-- Post -- Post
update post set ap_id = replace (ap_id, 'old_domain', 'new_domain'); update post set ap_id = replace (ap_id, 'old_domain', 'new_domain');
update post set url = replace (url, 'old_domain', 'new_domain'); update post set url = replace (url, 'old_domain', 'new_domain');
@ -74,17 +82,31 @@ update post set thumbnail_url = replace (thumbnail_url, 'old_domain', 'new_domai
update comment set ap_id = replace (ap_id, 'old_domain', 'new_domain'); update comment set ap_id = replace (ap_id, 'old_domain', 'new_domain');
update comment set content = replace (content, 'old_domain', 'new_domain'); update comment set content = replace (content, 'old_domain', 'new_domain');
-- Private messages
update private_message set ap_id = replace (ap_id, 'old_domain', 'new_domain');
update private_message set content = replace (content, 'old_domain', 'new_domain');
-- User -- User
update user_ set actor_id = replace (actor_id, 'old_domain', 'new_domain'); update person set actor_id = replace (actor_id, 'old_domain', 'new_domain');
update user_ set inbox_url = replace (inbox_url, 'old_domain', 'new_domain'); update person set inbox_url = replace (inbox_url, 'old_domain', 'new_domain');
update user_ set shared_inbox_url = replace (shared_inbox_url, 'old_domain', 'new_domain'); update person set shared_inbox_url = replace (shared_inbox_url, 'old_domain', 'new_domain');
update user_ set avatar = replace (avatar, 'old_domain', 'new_domain'); update person set bio = replace (bio, 'old_domain', 'new_domain');
update person set avatar = replace (avatar, 'old_domain', 'new_domain');
update person set banner = replace (banner, 'old_domain', 'new_domain');
-- Community -- Community
update community set actor_id = replace (actor_id, 'old_domain', 'new_domain'); update community set actor_id = replace (actor_id, 'old_domain', 'new_domain');
update community set followers_url = replace (followers_url, 'old_domain', 'new_domain'); update community set followers_url = replace (followers_url, 'old_domain', 'new_domain');
update community set inbox_url = replace (inbox_url, 'old_domain', 'new_domain'); update community set inbox_url = replace (inbox_url, 'old_domain', 'new_domain');
update community set shared_inbox_url = replace (shared_inbox_url, 'old_domain', 'new_domain'); update community set shared_inbox_url = replace (shared_inbox_url, 'old_domain', 'new_domain');
update community set moderators_url = replace (moderators_url, 'old_domain', 'new_domain');
update community set featured_url = replace (featured_url, 'old_domain', 'new_domain');
update community set description = replace (description, 'old_domain', 'new_domain');
update community set icon = replace (icon, 'old_domain', 'new_domain');
update community set banner = replace (banner, 'old_domain', 'new_domain');
--- Custom Emoji
update custom_emoji set image_url = replace (image_url, 'old_domain', 'new_domain');
``` ```