Update actor

This commit is contained in:
Mirai Kumiko 2025-06-20 09:20:26 +02:00
parent b475f86313
commit 1ce7fdade0
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
2 changed files with 5 additions and 0 deletions

View file

@ -90,6 +90,8 @@ defmodule Nulla.Models.Actor do
:publicKey,
:endpoints
])
|> unique_constraint([:preferredUsername, :domain])
|> unique_constraint(:ap_id)
end
def create_actor(attrs) when is_map(attrs) do

View file

@ -31,5 +31,8 @@ defmodule Nulla.Repo.Migrations.CreateActors do
add :vcard_bday, :date
add :vcard_Address, :string
end
create unique_index(:actors, [:preferredUsername, :domain])
create unique_index(:actors, [:ap_id])
end
end