amelioration(data): ajoute un index sur users.last_signed_in_at

This commit is contained in:
Martin 2023-11-09 20:06:51 +01:00 committed by mfo
parent 81826e2509
commit e99f9b5c17
2 changed files with 8 additions and 0 deletions

View file

@ -0,0 +1,7 @@
class AddIndexToUserssOnLastSignInAt < ActiveRecord::Migration[7.0]
disable_ddl_transaction!
def change
add_index :users, :last_sign_in_at, algorithm: :concurrently
end
end

View file

@ -1072,6 +1072,7 @@ ActiveRecord::Schema[7.0].define(version: 2023_11_14_113317) do
t.datetime "updated_at", precision: 6 t.datetime "updated_at", precision: 6
t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true
t.index ["email"], name: "index_users_on_email", unique: true t.index ["email"], name: "index_users_on_email", unique: true
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 ["unlock_token"], name: "index_users_on_unlock_token", unique: true t.index ["unlock_token"], name: "index_users_on_unlock_token", unique: true