adding indexes to oauth_tokens table
authorAlex S <alex.strizhakov@gmail.com>
Wed, 3 Apr 2019 13:51:09 +0000 (20:51 +0700)
committerAlex S <alex.strizhakov@gmail.com>
Wed, 3 Apr 2019 13:51:09 +0000 (20:51 +0700)
priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs [new file with mode: 0644]

diff --git a/priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs b/priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs
new file mode 100644 (file)
index 0000000..ebcd293
--- /dev/null
@@ -0,0 +1,9 @@
+defmodule Pleroma.Repo.Migrations.AddOauthTokenIndexes do
+  use Ecto.Migration
+
+  def change do
+    create(unique_index(:oauth_tokens, [:token]))
+    create(index(:oauth_tokens, [:app_id]))
+    create(index(:oauth_tokens, [:user_id]))
+  end
+end