# Пересборка не удаётся при изменении только имени поддомена

**URL:** https://meta.discourse.org/t/rebake-fails-when-changing-the-subdomain-name-only/128104
**Category:** Self-hosting
**Created:** [09.Сентябрь.2019 22:27:28 UTC](https://meta.discourse.org/t/rebake-fails-when-changing-the-subdomain-name-only/128104 "2019-09-09T22:27:28Z")
**Posts on this page:** 1
**Showing post:** 5

<div class="post-metadata">

### Author: ![YaserAlnajjar](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yaseralnajjar/32/100729_2.png) [@YaserAlnajjar](https://meta.discourse.org/u/YaserAlnajjar)
#### Post date: [10.Сентябрь.2019 00:30:49 UTC](https://meta.discourse.org/t/rebake-fails-when-changing-the-subdomain-name-only/128104/5 "2019-09-10T00:30:49Z")

</div>

Вот что я сделал:

1. Запустил команду, на которую вы указали (без `from` 😁)

2. Запустил rebake снова, и теперь процесс остановился здесь:

```plaintext
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. Поиск в Google по запросу `"unique_post_links"` показал, что соответствующая таблица называется `topic_links` в файле [schema.sql](https://github.com/prisma/database-schema-examples/blob/master/postgres/discourse/schema.sql#L9190)

2. На этот раз ссылки были частичными, поэтому я использовал запрос с заменой:

```plaintext
DB.exec "update topic_links set url=REPLACE(url, 'discourse.coretabs.net', 'discourse-old.coretabs.net')"

```

1. Снова запустил rebake.

Всё сработало как по маслу, спасибо, Сэм 🌹

---

_[View the full topic](https://meta.discourse.org/t/rebake-fails-when-changing-the-subdomain-name-only/128104)._
