# בעיות בעדכון מ-3.0.0 ל-3.0.1

**URL:** <https://meta.discourse.org/t/problems-while-updating-from-3-0-0-to-3-0-1/253066>\
**Category:** Self-hosting\
**Created:** [27 בינואר,‏ 2023,‏ 6:25am UTC](https://meta.discourse.org/t/problems-while-updating-from-3-0-0-to-3-0-1/253066 "2023-01-27T06:25:07Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![Massi](https://avatars.discourse-cdn.com/v4/letter/m/b9e5f3/32.png) [@Massi](https://meta.discourse.org/u/Massi)\
**Post date:** [27 בינואר,‏ 2023,‏ 6:25am UTC](https://meta.discourse.org/t/problems-while-updating-from-3-0-0-to-3-0-1/253066/1 "2023-01-27T06:25:07Z")

</div>

Hi,

today I updated our Discourse app to 3.0.1. The Update failed trying to process the postgres migration.  
Specifically here:

```plaintext
2023-01-27 04:50:48.628 UTC [483] discourse@discourse ERROR: duplicate key value violates unique constraint "index_tags_on_name"
2023-01-27 04:50:48.628 UTC [483] discourse@discourse DETAIL: Key (name)=(e-mail) already exists.
2023-01-27 04:50:48.628 UTC [483] discourse@discourse STATEMENT: UPDATE tags t
	SET public_topic_count = x.topic_count
	FROM (
	  SELECT
	    COUNT(topics.id) AS topic_count,
	    tags.id AS tag_id
	  FROM tags
	  INNER JOIN topic_tags ON tags.id = topic_tags.tag_id
	  INNER JOIN topics ON topics.id = topic_tags.topic_id AND topics.deleted_at IS NULL AND topics.archetype != 'private_message'
	  INNER JOIN categories ON categories.id = topics.category_id AND NOT categories.read_restricted
	  GROUP BY tags.id
	) x
	WHERE x.tag_id = t.id
	AND x.topic_count <> t.public_topic_count;
	
rake aborted!
StandardError: An error has occurred, this and all later migrations canceled:

```

Some tags seemed to be have duplicates. I connected to postgres and corrected the tags. The migration and update ran through afterwards

My question is, have I handled it correctly messing around in the DB? I only changed the name of the duplicate tags.  
I can’t say how the duplicate tags were created. They were inserted round the last 2 to 3 years.  
I am not sure if this situation might occur again.

---

_[View the full topic](https://meta.discourse.org/t/problems-while-updating-from-3-0-0-to-3-0-1/253066)._
