Merge pull request #11036 from colinux/add-users-unconfirmed-email-index

Tech: ajoute index sur `users#unconfirmed_email`
This commit is contained in:
LeSim 2024-11-12 10:51:45 +00:00 committed by GitHub
commit f2b33677f8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 11 additions and 1 deletions

View file

@ -0,0 +1,9 @@
# frozen_string_literal: true
class AddUnconfirmedEmailIndexToUsers < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
add_index :users, :unconfirmed_email, algorithm: :concurrently
end
end

View file

@ -10,7 +10,7 @@
# #
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema[7.0].define(version: 2024_10_14_084333) do ActiveRecord::Schema[7.0].define(version: 2024_11_12_090128) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "pg_buffercache" enable_extension "pg_buffercache"
enable_extension "pg_stat_statements" enable_extension "pg_stat_statements"
@ -1236,6 +1236,7 @@ ActiveRecord::Schema[7.0].define(version: 2024_10_14_084333) do
t.index ["last_sign_in_at"], name: "index_users_on_last_sign_in_at" t.index ["last_sign_in_at"], name: "index_users_on_last_sign_in_at"
t.index ["requested_merge_into_id"], name: "index_users_on_requested_merge_into_id" t.index ["requested_merge_into_id"], name: "index_users_on_requested_merge_into_id"
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
t.index ["unconfirmed_email"], name: "index_users_on_unconfirmed_email"
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
end end