From 4373c942bbcd610b4e36f410d9e4f6462d45fb07 Mon Sep 17 00:00:00 2001 From: Claire Date: Tue, 4 Jul 2023 11:25:29 +0200 Subject: [PATCH] Fix forgotten unconfirmed_email migration file (#25702) --- ...20230702151753_add_index_user_on_unconfirmed_email.rb | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 db/migrate/20230702151753_add_index_user_on_unconfirmed_email.rb diff --git a/db/migrate/20230702151753_add_index_user_on_unconfirmed_email.rb b/db/migrate/20230702151753_add_index_user_on_unconfirmed_email.rb new file mode 100644 index 0000000000..a935463eaa --- /dev/null +++ b/db/migrate/20230702151753_add_index_user_on_unconfirmed_email.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddIndexUserOnUnconfirmedEmail < ActiveRecord::Migration[6.1] + disable_ddl_transaction! + + def change + add_index :users, :unconfirmed_email, where: 'unconfirmed_email IS NOT NULL', algorithm: :concurrently + end +end