diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-11-27 16:32:46 -0600 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-12-02 10:43:22 -0600 |
commit | 0847e3e496624a97c7eb933cf69a92fd84677ce0 (patch) | |
tree | 349a4023969708c2986f4bd0d60049381a69a6bc | |
parent | d4320e0daf7c732ba2c791cae697dea27c4919d2 (diff) | |
download | pleroma-0847e3e496624a97c7eb933cf69a92fd84677ce0.tar.gz |
Print whole config when resetting and include a scary looking message.
-rw-r--r-- | lib/mix/tasks/pleroma/config.ex | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/mix/tasks/pleroma/config.ex b/lib/mix/tasks/pleroma/config.ex index a7c307f77..0c8170c9c 100644 --- a/lib/mix/tasks/pleroma/config.ex +++ b/lib/mix/tasks/pleroma/config.ex @@ -131,6 +131,15 @@ defmodule Mix.Tasks.Pleroma.Config do with true <- Pleroma.Config.get([:configurable_from_database]) do start_pleroma() + shell_info("The following settings will be permanently removed:") + + ConfigDB + |> Repo.all() + |> Enum.sort() + |> Enum.each(&dump(&1)) + + shell_error("THIS CANNOT BE UNDONE!") + if shell_prompt("Are you sure you want to continue?", "n") in ~w(Yn Y y) do Ecto.Adapters.SQL.query!(Repo, "TRUNCATE config;") Ecto.Adapters.SQL.query!(Repo, "ALTER SEQUENCE config_id_seq RESTART;") |