AddUniqueIndexToLabels fails when there are no duplicated ids
There is a problem with db/migrate/20161017125927_add_unique_index_to_labels.rb
, where if duplicated_ids
is empty, it produces an invalid SQL like this one UPDATE label_links SET label_id = 1234 WHERE label_id IN()
.
Check if the duplicates_ids array is empty beforehand.