-- Rollback migration: update sojorn.net back to gosojorn.com

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

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

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

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

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