- if length(keys) > 0 do
- shell_info("The following configuration keys under :#{group} are set in ConfigDB:\r\n")
- keys |> Enum.each(fn x -> shell_info("- #{x}") end)
- shell_info("\r\n")
+ ConfigDB
+ |> Repo.all()
+ |> Enum.sort()
+ |> Enum.each(&dump(&1))
+
+ shell_error("\nTHIS 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;")
+
+ shell_info("The ConfigDB settings have been removed from the database.")
+ else
+ shell_error("No changes made.")