logo

pleroma

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

20200804180322_remove_nonlocal_expirations.exs (475B)


  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.RemoveNonlocalExpirations do
  5. use Ecto.Migration
  6. def up do
  7. statement = """
  8. DELETE FROM
  9. activity_expirations A USING activities B
  10. WHERE
  11. A.activity_id = B.id
  12. AND B.local = false;
  13. """
  14. execute(statement)
  15. end
  16. def down do
  17. :ok
  18. end
  19. end