This commit is contained in:
Mirai Kumiko 2025-06-17 12:06:36 +02:00
parent 58049c93d4
commit 894866ca03
Signed by: miraikumiko
GPG key ID: 3F178B1B5E0CB278
22 changed files with 344 additions and 213 deletions

View file

@ -4,15 +4,16 @@ defmodule Nulla.Repo.Migrations.CreateActivities do
def change do
create table(:activities, primary_key: false) do
add :id, :bigint, primary_key: true
add :ap_id, :string, null: false
add :type, :string, null: false
add :actor, :string, null: false
add :actor_id, references(:actors, type: :bigint, on_delete: :nothing), null: false
add :object, :map, null: false
add :to, {:array, :string}, default: []
timestamps()
end
create index(:activities, [:actor])
create index(:activities, [:type])
create index(:activities, [:actor_id])
end
end