[index] index on users.remember_token

This commit is contained in:
Fosco Marotto 2021-01-17 11:13:39 -05:00
parent adf0e7ae72
commit e29925e534
2 changed files with 9 additions and 1 deletions

View File

@ -0,0 +1,7 @@
class AddIndexOnUsersRememberToken < ActiveRecord::Migration[5.2]
disable_ddl_transaction!
def change
add_index :users, :remember_token, 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.define(version: 2021_01_08_123456) do
ActiveRecord::Schema.define(version: 2021_01_17_111000) do
# These are extensions that must be enabled in order to support this database
enable_extension "pg_stat_statements"
@ -854,6 +854,7 @@ ActiveRecord::Schema.define(version: 2021_01_08_123456) do
t.index ["created_by_application_id"], name: "index_users_on_created_by_application_id"
t.index ["current_sign_in_at"], name: "index_users_on_current_sign_in_at"
t.index ["email"], name: "index_users_on_email", unique: true
t.index ["remember_token"], name: "index_users_on_remember_token"
t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true
t.index ["unique_email"], name: "index_users_on_unique_email"
end