では、私が行った手順は以下の通りです:
-
ご指摘のコマンドを実行しました(
fromは含めませんでした
) -
再度 rebake を実行すると、ここで停止しました:
Rewriting all occurences of forums.coretabs.net to discourse.coretabs.net
THIS TASK WILL REWRITE DATA, ARE YOU SURE (type YES)
YES
incoming_domains=1
incoming_referers=3
invites=1
javascript_caches=1
post_revisions=509
posts=84
single_sign_on_records=1099
theme_fields=4
topic_custom_fields=4
Error: ERROR: duplicate key value violates unique constraint "unique_post_links"
DETAIL: Key (topic_id, post_id, url)=(69, 212, https://discourse.coretabs.net/t/topic/365) already exists.
The remap has only been partially applied due to the error above. Please re-run the script again.
-
"unique_post_links"を Google で検索したところ、対応するテーブルは schema.sql のtopic_linksであることが分かりました。 -
今回はリンクが部分的だったため、replace クエリを使用しました:
DB.exec "update topic_links set url=REPLACE(url, 'discourse.coretabs.net', 'discourse-old.coretabs.net')"
- 再度 rebake を実行しました。
見事に動作しました。Sam さん、ありがとう ![]()