db60640c5b
Co-authored-by: FloatingGhost <hannah@coffee-and-dreams.uk> Reviewed-on: https://akkoma.dev/AkkomaGang/akkoma/pulls/327
20 lines
520 B
Elixir
20 lines
520 B
Elixir
defmodule Pleroma.Repo.Migrations.AddCascadeToReportNotesOnActivityDelete do
|
|
use Ecto.Migration
|
|
|
|
def up do
|
|
drop(constraint(:report_notes, "report_notes_activity_id_fkey"))
|
|
|
|
alter table(:report_notes) do
|
|
modify(:activity_id, references(:activities, type: :uuid, on_delete: :delete_all))
|
|
end
|
|
end
|
|
|
|
def down do
|
|
drop(constraint(:report_notes, "report_notes_activity_id_fkey"))
|
|
|
|
alter table(:report_notes) do
|
|
modify(:activity_id, references(:activities, type: :uuid))
|
|
end
|
|
end
|
|
end
|