From e29925e5345feea3b650f3d71f853e9f29f00164 Mon Sep 17 00:00:00 2001 From: Fosco Marotto Date: Sun, 17 Jan 2021 11:13:39 -0500 Subject: [PATCH] [index] index on users.remember_token --- .../20210117111000_add_index_on_users_remember_token.rb | 7 +++++++ db/schema.rb | 3 ++- 2 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20210117111000_add_index_on_users_remember_token.rb diff --git a/db/migrate/20210117111000_add_index_on_users_remember_token.rb b/db/migrate/20210117111000_add_index_on_users_remember_token.rb new file mode 100644 index 00000000..877b234c --- /dev/null +++ b/db/migrate/20210117111000_add_index_on_users_remember_token.rb @@ -0,0 +1,7 @@ +class AddIndexOnUsersRememberToken < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def change + add_index :users, :remember_token, algorithm: :concurrently + end +end diff --git a/db/schema.rb b/db/schema.rb index e0a05c6b..5c1e5965 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -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