X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Frepo%2Fmigrations%2F20190403131720_add_oauth_token_indexes.exs;h=ab1bf2165e374d776f80189703e345c513947503;hb=c5769bbf6d3b0dd7010ceb06293e6dab4fc874c2;hp=ebcd293893b830ceb838b13bf2f5836aba14833b;hpb=777042b9e5499c1c62cc59b062da0aa1ef4fa592;p=akkoma 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