summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs
diff options
context:
space:
mode:
authorIvan Tashkinov <ivant.business@gmail.com>2019-07-06 10:17:06 +0300
committerIvan Tashkinov <ivant.business@gmail.com>2019-07-06 10:17:06 +0300
commitad8d86e7c600bca65e5f0bb407651d33f1e53043 (patch)
tree75c395c888a10bad571769eaf828d989c2a5b2c4 /priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs
parenta7994185739522dee80e22f76e5fdac1a3b8279b (diff)
parent3589b30ddc9d0c23ca6f00264cff05e53be1b270 (diff)
downloadpleroma-ad8d86e7c600bca65e5f0bb407651d33f1e53043.tar.gz
pleroma-ad8d86e7c600bca65e5f0bb407651d33f1e53043.zip
Merge remote-tracking branch 'remotes/upstream/develop' into 161-incoming-replies-depth-limit
Diffstat (limited to 'priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs')
-rw-r--r--priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs6
1 files changed, 3 insertions, 3 deletions
diff --git a/priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs b/priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs
index ebcd29389..ab1bf2165 100644
--- a/priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs
+++ b/priv/repo/migrations/20190403131720_add_oauth_token_indexes.exs
@@ -2,8 +2,8 @@ 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]))
+ create_if_not_exists(unique_index(:oauth_tokens, [:token]))
+ create_if_not_exists(index(:oauth_tokens, [:app_id]))
+ create_if_not_exists(index(:oauth_tokens, [:user_id]))
end
end