2019-01-25 09:23:44 +01:00
|
|
|
defmodule Mobilizon.Repo.Migrations.GroupDeleteMembersCascade do
|
|
|
|
use Ecto.Migration
|
|
|
|
|
|
|
|
def change do
|
2019-02-22 14:18:52 +01:00
|
|
|
drop(constraint(:members, "members_account_id_fkey"))
|
|
|
|
drop(constraint(:members, "members_parent_id_fkey"))
|
2019-01-25 09:23:44 +01:00
|
|
|
|
|
|
|
alter table(:members) do
|
2019-02-22 14:18:52 +01:00
|
|
|
modify(:actor_id, references(:actors, on_delete: :delete_all))
|
|
|
|
modify(:parent_id, references(:actors, on_delete: :delete_all))
|
2019-01-25 09:23:44 +01:00
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|