Skip to content

Remove tag duplicates

Valery Sizov requested to merge tag_dup into master

Prevention of getting this error:

ActiveRecord::RecordNotUnique: PG::Error: ERROR:  could not create unique index "index_tags_on_name"
DETAIL:  Key (name)=(XSS') is duplicated.
: CREATE UNIQUE INDEX  "index_tags_on_name" ON "tags"  ("name")

This migration fails if there are duplicates: https://github.com/mbleigh/acts-as-taggable-on/blob/v3.5.0/db/migrate/2_add_missing_unique_indices.rb#L3

Merge request reports