mirror of
https://akkoma.dev/AkkomaGang/akkoma.git
synced 2024-11-11 10:33:09 +00:00
15 lines
426 B
Elixir
15 lines
426 B
Elixir
defmodule Pleroma.Repo.Migrations.CreateUserMutes do
|
|
use Ecto.Migration
|
|
|
|
def change do
|
|
create_if_not_exists table(:user_mutes) do
|
|
add(:muter_id, references(:users, type: :uuid, on_delete: :delete_all))
|
|
add(:mutee_id, references(:users, type: :uuid, on_delete: :delete_all))
|
|
|
|
timestamps(updated_at: false)
|
|
end
|
|
|
|
create_if_not_exists(unique_index(:user_mutes, [:muter_id, :mutee_id]))
|
|
end
|
|
end
|