]> cat aescling's git repositories - mastodon.git/commitdiff
Add users remember_token index (#11881)
authorabcang <abcang1015@gmail.com>
Wed, 18 Sep 2019 08:58:08 +0000 (17:58 +0900)
committerEugen Rochko <eugen@zeonfederated.com>
Wed, 18 Sep 2019 08:58:08 +0000 (10:58 +0200)
db/migrate/20190917213523_add_remember_token_index.rb [new file with mode: 0644]
db/schema.rb

diff --git a/db/migrate/20190917213523_add_remember_token_index.rb b/db/migrate/20190917213523_add_remember_token_index.rb
new file mode 100644 (file)
index 0000000..c5b41ce
--- /dev/null
@@ -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
index 834dddd7bd43ef9cf06906c854959603495ab568..749f79deeee56c8d361d57de4437c7904e96e666 100644 (file)
@@ -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