analytics/priv/repo/migrations/20240702055817_traffic_drop_notifications.exs
hq1 76da6b49a1
Migration: add traffic change type (#4325)
* Migration: add traffic change type

* Update schema
2024-07-11 11:01:11 +02:00

14 lines
320 B
Elixir

defmodule Plausible.Repo.Migrations.TrafficDropNotifications do
use Ecto.Migration
def change do
drop index(:spike_notifications, [:site_id])
alter table(:spike_notifications) do
add :type, :string, default: "spike"
end
create unique_index(:spike_notifications, [:site_id, :type])
end
end