analytics/priv/repo/migrations/20210629124428_cascade_site_deletion_to_invitations.exs
2021-06-29 15:45:24 +03:00

12 lines
304 B
Elixir

defmodule Plausible.Repo.Migrations.CascadeSiteDeletionToInvitations do
use Ecto.Migration
def change do
drop constraint("invitations", "invitations_site_id_fkey")
alter table(:invitations) do
modify :site_id, references(:sites, on_delete: :delete_all), null: false
end
end
end