logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://anongit.hacktivis.me/git/pleroma.git/

20190929201536_drop_subscription_if_exists.exs (518B)


  1. # Pleroma: A lightweight social networking server
  2. # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
  3. # SPDX-License-Identifier: AGPL-3.0-only
  4. defmodule Pleroma.Repo.Migrations.DropSubscriptionIfExists do
  5. use Ecto.Migration
  6. def change do
  7. end
  8. def up do
  9. drop_if_exists(index(:subscription_notifications, [:user_id]))
  10. drop_if_exists(index(:subscription_notifications, ["id desc nulls last"]))
  11. drop_if_exists(table(:subscription_notifications))
  12. end
  13. def down do
  14. :ok
  15. end
  16. end