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

@ -0,0 +1,23 @@
defmodule Nulla.Repo.Migrations.CreateActorRelations do
use Ecto.Migration
def change do
create table(:relations, primary_key: false) do
add :id, :bigint, primary_key: true
add :source_id, :bigint, null: false
add :target_id, :bigint, null: false
add :type, :string, null: false
add :status, :string, null: false
add :activity_id, :bigint
timestamps()
end
create index(:relations, [:source_id])
create index(:relations, [:target_id])
create index(:relations, [:type])
create index(:relations, [:activity_id])
create unique_index(:relations, [:source_id, :target_id, :type])
end
end