仅更改子域名时 Rebake 失败

以下是我所做的操作:

  1. 我运行了你指出的命令(不带 from :grin:

  2. 再次运行 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.
  1. 我搜索了 "unique_post_links",发现其对应的表在 schema.sql 中名为 topic_links

  2. 这次链接是部分的,所以我使用了一个替换查询:

DB.exec "update topic_links set url=REPLACE(url, 'discourse.coretabs.net', 'discourse-old.coretabs.net')"
  1. 再次运行 rebake。

问题完美解决,感谢 Sam :rose: