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