migration and warning for RemoteIp plug rename

This commit is contained in:
Alexander Strizhakov 2020-09-19 21:44:02 +03:00
commit 3cb9c88837
No known key found for this signature in database
GPG key ID: 022896A53AEF1381
2 changed files with 37 additions and 1 deletions

View file

@ -0,0 +1,19 @@
defmodule Pleroma.Repo.Migrations.RemoteipPlugRename do
use Ecto.Migration
import Ecto.Query
def up do
config =
from(c in Pleroma.ConfigDB, where: c.group == ^:pleroma and c.key == ^Pleroma.Plugs.RemoteIp)
|> Pleroma.Repo.one()
if config do
config
|> Ecto.Changeset.change(key: Pleroma.Web.Plugs.RemoteIp)
|> Pleroma.Repo.update()
end
end
def down, do: :ok
end