From 875cecf4d8f0ddf34f896ef01d50e42f67f0c0bf Mon Sep 17 00:00:00 2001 From: KMY Date: Tue, 8 Aug 2023 10:40:45 +0900 Subject: [PATCH] Fix downcase test --- db/migrate/20181207011115_downcase_custom_emoji_domains.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/db/migrate/20181207011115_downcase_custom_emoji_domains.rb b/db/migrate/20181207011115_downcase_custom_emoji_domains.rb index 3f3da937a5..0497f7be10 100644 --- a/db/migrate/20181207011115_downcase_custom_emoji_domains.rb +++ b/db/migrate/20181207011115_downcase_custom_emoji_domains.rb @@ -3,6 +3,10 @@ class DowncaseCustomEmojiDomains < ActiveRecord::Migration[5.2] disable_ddl_transaction! + class EmojiReaction < ApplicationRecord + # Dummy class, to make migration possible across version changes + end + def up duplicates = CustomEmoji.connection.select_all('SELECT string_agg(id::text, \',\') AS ids FROM custom_emojis GROUP BY shortcode, lower(domain) HAVING count(*) > 1').to_ary