mirror of
https://github.com/plausible/analytics.git
synced 2024-12-23 09:33:19 +03:00
Migration: cascade delete enterprise plans on user removal (#4684)
This commit is contained in:
parent
69949e9a16
commit
67e35fa1d2
@ -0,0 +1,11 @@
|
||||
defmodule Plausible.Repo.Migrations.CascadeDeleteEnterprisePlans do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
drop(constraint(:enterprise_plans, "enterprise_plans_user_id_fkey"))
|
||||
|
||||
alter table(:enterprise_plans) do
|
||||
modify(:user_id, references(:users, on_delete: :delete_all), null: false)
|
||||
end
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue
Block a user