mirror of
https://git.pleroma.social/pleroma/pleroma.git
synced 2024-06-02 21:39:30 +00:00
533928fd96
Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
21 lines
502 B
Elixir
21 lines
502 B
Elixir
# Pleroma: A lightweight social networking server
|
|
# Copyright © 2017-2023 Pleroma Authors <https://pleroma.social/>
|
|
# SPDX-License-Identifier: AGPL-3.0-only
|
|
|
|
defmodule Pleroma.Repo.Migrations.ChangeRelayActorType do
|
|
use Ecto.Migration
|
|
|
|
alias Pleroma.Repo
|
|
alias Pleroma.User
|
|
|
|
def change do
|
|
relay = User.get_by_nickname("relay")
|
|
|
|
if relay != nil and User.invisible?(relay) do
|
|
relay
|
|
|> Ecto.Changeset.change(actor_type: "Application")
|
|
|> Repo.update()
|
|
end
|
|
end
|
|
end
|