X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Frepo%2Fmigrations%2F20170906152508_create_o_auth_token.exs;h=bfad98b764e3b25a1daa33b94f183368e11a6858;hb=cc4c5f22f4e6946c40bfc4c9517eaeb28f39a27d;hp=ed56bbf364ed93bbbb8b129e49a468bd2d2224fc;hpb=bd961a3badaf7aa7ffc97ab92a6b04367d1c514b;p=akkoma diff --git a/priv/repo/migrations/20170906152508_create_o_auth_token.exs b/priv/repo/migrations/20170906152508_create_o_auth_token.exs index ed56bbf36..bfad98b76 100644 --- a/priv/repo/migrations/20170906152508_create_o_auth_token.exs +++ b/priv/repo/migrations/20170906152508_create_o_auth_token.exs @@ -2,12 +2,12 @@ defmodule Pleroma.Repo.Migrations.CreateOAuthToken do use Ecto.Migration def change do - create table(:oauth_tokens) do - add :app_id, references(:apps) - add :user_id, references(:users) - add :token, :string - add :refresh_token, :string - add :valid_until, :naive_datetime_usec + create_if_not_exists table(:oauth_tokens) do + add(:app_id, references(:apps)) + add(:user_id, references(:users)) + add(:token, :string) + add(:refresh_token, :string) + add(:valid_until, :naive_datetime_usec) timestamps() end