X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=priv%2Frepo%2Fmigrations%2F20170906143140_create_o_auth_authorizations.exs;h=9af8315a81c2a82bf2e61c82ecb0cd4290650362;hb=bdaa7e53940daa43b83e3baab836b701482e6d8f;hp=ead1d023e06f9bf0de991bb9e58f4d27e5908ccd;hpb=0f2f7d2cec8297b1b5645643d7584cde561ce628;p=akkoma diff --git a/priv/repo/migrations/20170906143140_create_o_auth_authorizations.exs b/priv/repo/migrations/20170906143140_create_o_auth_authorizations.exs index ead1d023e..9af8315a8 100644 --- a/priv/repo/migrations/20170906143140_create_o_auth_authorizations.exs +++ b/priv/repo/migrations/20170906143140_create_o_auth_authorizations.exs @@ -2,12 +2,12 @@ defmodule Pleroma.Repo.Migrations.CreateOAuthAuthorizations do use Ecto.Migration def change do - create table(:oauth_authorizations) do - add :app_id, references(:apps) - add :user_id, references(:users) - add :token, :string - add :valid_until, :naive_datetime_usec - add :used, :boolean, default: false + create_if_not_exists table(:oauth_authorizations) do + add(:app_id, references(:apps)) + add(:user_id, references(:users)) + add(:token, :string) + add(:valid_until, :naive_datetime_usec) + add(:used, :boolean, default: false) timestamps() end