diff options
author | abcang <abcang1015@gmail.com> | 2019-09-18 17:58:08 +0900 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2019-09-18 10:58:08 +0200 |
commit | 0e6390753d4a93af7e705f7cca5946e232298fc5 (patch) | |
tree | 80f7d8c208619a9594586fd857fe25163719b72d /db | |
parent | 0627252b30d9f420d51bb4787c539550d68a717a (diff) |
Add users remember_token index (#11881)
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20190917213523_add_remember_token_index.rb | 9 | ||||
-rw-r--r-- | db/schema.rb | 3 |
2 files changed, 11 insertions, 1 deletions
diff --git a/db/migrate/20190917213523_add_remember_token_index.rb b/db/migrate/20190917213523_add_remember_token_index.rb new file mode 100644 index 000000000..c5b41ce64 --- /dev/null +++ b/db/migrate/20190917213523_add_remember_token_index.rb @@ -0,0 +1,9 @@ +# frozen_string_literal: true + +class AddRememberTokenIndex < ActiveRecord::Migration[5.2] + disable_ddl_transaction! + + def change + add_index :users, :remember_token, algorithm: :concurrently, unique: true + end +end diff --git a/db/schema.rb b/db/schema.rb index 834dddd7b..749f79dee 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: 2019_09_04_222339) do +ActiveRecord::Schema.define(version: 2019_09_17_213523) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -743,6 +743,7 @@ ActiveRecord::Schema.define(version: 2019_09_04_222339) do t.index ["confirmation_token"], name: "index_users_on_confirmation_token", unique: true t.index ["created_by_application_id"], name: "index_users_on_created_by_application_id" t.index ["email"], name: "index_users_on_email", unique: true + t.index ["remember_token"], name: "index_users_on_remember_token", unique: true t.index ["reset_password_token"], name: "index_users_on_reset_password_token", unique: true end |