1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.DeleteHashtagsObjectsCascade do
9 execute("ALTER TABLE hashtags_objects DROP CONSTRAINT hashtags_objects_object_id_fkey")
11 alter table(:hashtags_objects) do
12 modify(:object_id, references(:objects, on_delete: :delete_all))
17 execute("ALTER TABLE hashtags_objects DROP CONSTRAINT hashtags_objects_object_id_fkey")
19 alter table(:hashtags_objects) do
20 modify(:object_id, references(:objects, on_delete: :nothing))