chore(schema): add unconfirmed_email index to users

This commit is contained in:
Colin Darie 2024-11-12 11:17:18 +01:00
parent 72d8e43b2a
commit 92f2d2901d
No known key found for this signature in database
GPG key ID: 4FB865FDBCA4BCC4
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.
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
enable_extension "pg_buffercache"
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 ["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 ["unconfirmed_email"], name: "index_users_on_unconfirmed_email"
t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true
end