defmodule WhoNeedHelp.Repo.Migrations.AddOpenVelocitySignalUniqueIndex do
  use Ecto.Migration

  def change do
    create unique_index(:abuse_signals, [:subject_id],
             where: "kind = 'velocity' AND status = 'open'",
             name: :abuse_signals_one_open_velocity_per_subject
           )
  end
end
