DEV: fix migration to only remove duplicates

The migration was removing all but one 'on_holiday' user custom field...

Not big deal though since that custom field is being (re)set regularly in the 'update_holiday_usernames' job.
This commit is contained in:
Régis Hanol 2020-01-21 18:09:46 +01:00
parent 30119dda08
commit 517fdbfab7
1 changed files with 1 additions and 0 deletions

View File

@ -8,6 +8,7 @@ class AddOnHolidayIndex < ActiveRecord::Migration[5.2]
USING user_custom_fields b
WHERE a.name = 'on_holiday'
AND a.name = b.name
AND a.user_id = b.user_id
AND a.id > b.id
SQL