Print whole config when resetting and include a scary looking message.
This commit is contained in:
parent
d4320e0daf
commit
0847e3e496
|
@ -131,6 +131,15 @@ def run(["reset"]) do
|
||||||
with true <- Pleroma.Config.get([:configurable_from_database]) do
|
with true <- Pleroma.Config.get([:configurable_from_database]) do
|
||||||
start_pleroma()
|
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
|
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, "TRUNCATE config;")
|
||||||
Ecto.Adapters.SQL.query!(Repo, "ALTER SEQUENCE config_id_seq RESTART;")
|
Ecto.Adapters.SQL.query!(Repo, "ALTER SEQUENCE config_id_seq RESTART;")
|
||||||
|
|
Loading…
Reference in New Issue