From 517fdbfab7669a4fdf130cf6defb07a19c1d17c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9gis=20Hanol?= Date: Tue, 21 Jan 2020 18:09:46 +0100 Subject: [PATCH] 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. --- db/migrate/20190724181542_add_on_holiday_index.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/db/migrate/20190724181542_add_on_holiday_index.rb b/db/migrate/20190724181542_add_on_holiday_index.rb index 72ecf754..d4e5d4ce 100644 --- a/db/migrate/20190724181542_add_on_holiday_index.rb +++ b/db/migrate/20190724181542_add_on_holiday_index.rb @@ -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