# Problema para fusionar dos foros

**URL:** <https://meta.discourse.org/t/problem-for-merge-two-forum/225189>\
**Category:** Self-hosting\
**Created:** [25 Abril, 2022 05:47 UTC](https://meta.discourse.org/t/problem-for-merge-two-forum/225189 "2022-04-25T05:47:06Z")\
**Posts on this page:** 1\
**Showing post:** 10

<div class="post-metadata">

**Author:** ![McFly](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/mcfly/32/257919_2.png) [@McFly](https://meta.discourse.org/u/McFly)\
**Post date:** [9 Mayo, 2022 13:15 UTC](https://meta.discourse.org/t/problem-for-merge-two-forum/225189/10 "2022-05-09T13:15:50Z")

</div>

Hola,

Muchas gracias por el seguimiento y la reactividad.

Como la migración de dos foros es un camino largo y lleno de obstáculos, me vuelvo a enfrentar a un problema.  
Acabo de hacer la modificación en el archivo `discourse_merge.rb` y luego volví a ejecutar el comando.

Ahora tengo un problema con un HASH existente.

Entiendo que es un problema de duplicados, ¿pero de qué naturaleza?

Ya eliminé un usuario duplicado, después de intentar renombrarlo para mi prueba, pero ahora es este problema del token (¿aunque creo que los duplicados a nivel de usuario se manejan?)

Gracias de nuevo por tu ayuda.

```plaintext
discourse@testforum-app:/var/www/discourse$ IMPORT=1 DB_NAME=copyme DB_PASS=password SOURCE_BASE_URL=http://other.forum.fr UPLOADS_PATH=/var/www/discourse/public/uploads/default bundle exec ruby script/bulk_import/discourse_merger.rb
Loading application...
Starting...
Preloading I18n...
Fixing highest post numbers...
Loading imported group ids...
Loading imported user ids...
Loading imported category ids...
Loading imported topic ids...
Loading imported post ids...
Loading groups indexes...
Loading users indexes...
Loading categories indexes...
Loading topics indexes...
Loading posts indexes...
Loading post actions indexes...

merging users...
copying email_tokens...
Traceback (most recent call last):
    7: from script/bulk_import/discourse_merger.rb:817:in `<main>'
    6: from script/bulk_import/discourse_merger.rb:71:in `start'
    5: from /var/www/discourse/script/bulk_import/base.rb:100:in `run'
    4: from script/bulk_import/discourse_merger.rb:82:in `execute'
    3: from script/bulk_import/discourse_merger.rb:145:in `copy_user_stuff'
    2: from script/bulk_import/discourse_merger.rb:445:in `copy_model'
    1: from /var/www/discourse/vendor/bundle/ruby/2.7.0/gems/pg-1.3.5/lib/pg/connection.rb:262:in `copy_data'
/var/www/discourse/vendor/bundle/ruby/2.7.0/gems/pg-1.3.5/lib/pg/connection.rb:262:in `get_last_result': ERROR: duplicate key value violates unique constraint "index_email_tokens_on_token_hash" (PG::UniqueViolation)
DETAIL: Key (token_hash)=(07165399523fcdce0679e45950f0260b61386a5c886e3e68fa6cf047d84d1caf) already exists.
CONTEXT: COPY email_tokens, line 1

```

---

_[View the full topic](https://meta.discourse.org/t/problem-for-merge-two-forum/225189)._
