fix(together): CASE文の型キャスト修正でアーカイブSQL修復

This commit is contained in:
posimai 2026-04-22 12:54:24 +09:00
parent 7446568adf
commit 5d1b6dfb2b
1 changed files with 2 additions and 2 deletions

View File

@ -2637,8 +2637,8 @@ ${excerpt}
`UPDATE together_shares
SET full_content=$1,
title=CASE
WHEN title IS NULL THEN $2
WHEN $2 IS NOT NULL AND title = (regexp_replace($3, '^https?://(www\.)?', ''))::text THEN $2
WHEN title IS NULL THEN $2::text
WHEN $2::text IS NOT NULL AND title = regexp_replace($3::text, '^https?://(www\.)?([^/]+).*$', '\2') THEN $2::text
ELSE title
END
WHERE id=$4`,