logo

pleroma

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

20191104133100_set_visible_service_actors.exs (546B)


  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.SetVisibleServiceActors do
  5. use Ecto.Migration
  6. import Ecto.Query
  7. alias Pleroma.Repo
  8. def up do
  9. user_nicknames = ["relay", "internal.fetch"]
  10. from(
  11. u in "users",
  12. where: u.nickname in ^user_nicknames,
  13. update: [
  14. set: [invisible: true]
  15. ]
  16. )
  17. |> Repo.update_all([])
  18. end
  19. def down do
  20. :ok
  21. end
  22. end