s4

changeset 790:7ac852e8c216 feature-world

Update URL only itself
author HIROSE Yuuji <yuuji@gentei.org>
date Sat, 13 Jun 2020 17:04:29 +0900
parents ce8942919edf
children 567980314463
files s4-migrate.sh
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line diff
     1.1 --- a/s4-migrate.sh	Sat Jun 13 14:33:23 2020 +0900
     1.2 +++ b/s4-migrate.sh	Sat Jun 13 17:04:29 2020 +0900
     1.3 @@ -114,12 +114,10 @@
     1.4      echo "New URL: $dsturl"
     1.5      query <<-EOF
     1.6  	UPDATE dst.article_s
     1.7 -	SET val=replace(val, '$URL', '$dsturl')
     1.8 -	WHERE key='text' AND val LIKE '|${URL}|' ESCAPE '|';
     1.9 -	UPDATE dst.blog_s
    1.10 -	SET val=replace(val, '$URL', '$dsturl')
    1.11 -	WHERE key='heading' AND val LIKE '|${URL}|' ESCAPE '|';
    1.12 -	EOF
    1.13 +	SET val=replace(val,
    1.14 +			'${URL}?grp+$grid',
    1.15 +			'${dsturl}?grp+$destrowid')
    1.16 +	WHERE key='text' AND val LIKE '%${URL}%';
    1.17      # Create blog-rowid conversion table
    1.18      sedfile=$tmpd/arttrans.sed
    1.19      # sedfile=tmp/arttrans.sed