X-Git-Url: http://git.squeep.com/?a=blobdiff_plain;f=priv%2Frepo%2Fmigrations%2F20190315101315_create_registrations.exs;h=6b28cbdd32d4de695857de9987b6501074bc4e15;hb=026b245dbc2900d90a737f024b87453bf552b62b;hp=dac86b7805ddbe77532e68e521339c14c60ee056;hpb=26b63540953f6a65bb52531b434fd6ab85aaedfe;p=akkoma diff --git a/priv/repo/migrations/20190315101315_create_registrations.exs b/priv/repo/migrations/20190315101315_create_registrations.exs index dac86b780..6b28cbdd3 100644 --- a/priv/repo/migrations/20190315101315_create_registrations.exs +++ b/priv/repo/migrations/20190315101315_create_registrations.exs @@ -2,7 +2,8 @@ defmodule Pleroma.Repo.Migrations.CreateRegistrations do use Ecto.Migration def change do - create table(:registrations) do + create 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 @@ -12,5 +13,6 @@ defmodule Pleroma.Repo.Migrations.CreateRegistrations do end create unique_index(:registrations, [:provider, :uid]) + create unique_index(:registrations, [:user_id, :provider, :uid]) end end