X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;ds=sidebyside;f=priv%2Frepo%2Fmigrations%2F20190315101315_create_registrations.exs;h=d705a499e4a692ab75027d66fdb4ee2edadd5d77;hb=d884087e7c66be0cf08341a3179c1c5e8c6e1def;hp=34a390a937efc1f9e34f9b03d35f2a7f5578fa17;hpb=5f1dd4fe8006137f198ca09c72536d22ed472e24;p=akkoma diff --git a/priv/repo/migrations/20190315101315_create_registrations.exs b/priv/repo/migrations/20190315101315_create_registrations.exs index 34a390a93..d705a499e 100644 --- a/priv/repo/migrations/20190315101315_create_registrations.exs +++ b/priv/repo/migrations/20190315101315_create_registrations.exs @@ -3,16 +3,16 @@ defmodule Pleroma.Repo.Migrations.CreateRegistrations do def change do create_if_not_exists table(:registrations, primary_key: false) do - add :id, :uuid, primary_key: true - add :user_id, references(:users, type: :uuid, on_delete: :delete_all) - add :provider, :string - add :uid, :string - add :info, :map, default: %{} + add(:id, :uuid, primary_key: true) + add(:user_id, references(:users, type: :uuid, on_delete: :delete_all)) + add(:provider, :string) + add(:uid, :string) + add(:info, :map, default: %{}) timestamps() end - create_if_not_exists unique_index(:registrations, [:provider, :uid]) - create_if_not_exists unique_index(:registrations, [:user_id, :provider, :uid]) + create_if_not_exists(unique_index(:registrations, [:provider, :uid])) + create_if_not_exists(unique_index(:registrations, [:user_id, :provider, :uid])) end end