-- Migration to update all legacy gosojorn.com URLs to sojorn.net

-- Update profiles
UPDATE profiles 
SET avatar_url = REPLACE(avatar_url, 'gosojorn.com', 'sojorn.net')
WHERE avatar_url LIKE '%gosojorn.com%';

UPDATE profiles 
SET cover_url = REPLACE(cover_url, 'gosojorn.com', 'sojorn.net')
WHERE cover_url LIKE '%gosojorn.com%';

-- Update posts
UPDATE posts 
SET image_url = REPLACE(image_url, 'gosojorn.com', 'sojorn.net')
WHERE image_url LIKE '%gosojorn.com%';

UPDATE posts 
SET video_url = REPLACE(video_url, 'gosojorn.com', 'sojorn.net')
WHERE video_url LIKE '%gosojorn.com%';

UPDATE posts 
SET thumbnail_url = REPLACE(thumbnail_url, 'gosojorn.com', 'sojorn.net')
WHERE thumbnail_url LIKE '%gosojorn.com%';
