about summary refs log tree commit diff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20190917213523_add_remember_token_index.rb9
1 files changed, 9 insertions, 0 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