From 0a1b6eeed5f30fbe73e4347064c2af3ef670d157 Mon Sep 17 00:00:00 2001 From: s9-sukyu <63638257+s9-sukyu@users.noreply.github.com> Date: Mon, 4 Dec 2023 13:49:28 +0900 Subject: [PATCH] =?UTF-8?q?=E8=B5=B7=E5=8B=95=E6=99=82=E3=81=ABOpenBD?= =?UTF-8?q?=E3=81=AEURL=E3=82=92Ndl=E3=81=AB=E6=9B=B8=E3=81=8D=E6=8F=9B?= =?UTF-8?q?=E3=81=88=E3=82=8B=E3=82=88=E3=81=86=E3=81=AB=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- model/db.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/model/db.go b/model/db.go index 2af3ea2..97a321f 100644 --- a/model/db.go +++ b/model/db.go @@ -92,5 +92,8 @@ func Migrate() error { } } + // https://cover.openbd.jp/xxx.jpg -> https://iss.ndl.go.jp/thumbnail/xxx + db.Exec("UPDATE items SET img_url=REPLACE(REPLACE(img_url, '.jpg', ''), 'https://cover.openbd.jp/', 'https://iss.ndl.go.jp/thumbnail/') WHERE img_url LIKE 'https://cover.openbd.jp/%'") + return nil }