logo

pleroma

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

20200824115541_rename_activity_expiration_setting.exs (517B)


  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.RenameActivityExpirationSetting do
  5. use Ecto.Migration
  6. def change do
  7. config = Pleroma.ConfigDB.get_by_params(%{group: :pleroma, key: Pleroma.ActivityExpiration})
  8. if config do
  9. config
  10. |> Ecto.Changeset.change(key: Pleroma.Workers.PurgeExpiredActivity)
  11. |> Pleroma.Repo.update()
  12. end
  13. end
  14. end