1 defmodule Pleroma.Repo.Migrations.CreateRegistrations do
5 create_if_not_exists table(:registrations, primary_key: false) do
6 add(:id, :uuid, primary_key: true)
7 add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
8 add(:provider, :string)
10 add(:info, :map, default: %{})
15 create_if_not_exists(unique_index(:registrations, [:provider, :uid]))
16 create_if_not_exists(unique_index(:registrations, [:user_id, :provider, :uid]))