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