1 defmodule Pleroma.Repo.Migrations.CreateUserBlocks do
5 create_if_not_exists table(:user_blocks) do
6 add(:blocker_id, references(:users, type: :uuid, on_delete: :delete_all))
7 add(:blockee_id, references(:users, type: :uuid, on_delete: :delete_all))
9 timestamps(updated_at: false)
12 create_if_not_exists(unique_index(:user_blocks, [:blocker_id, :blockee_id]))