Document how to delete individual configuration groups and completely reset the config without SQL

This commit is contained in:
Mark Felder 2020-11-25 17:31:44 -06:00
commit e8a4062d9d
2 changed files with 31 additions and 8 deletions

View file

@ -83,6 +83,19 @@ defmodule Mix.Tasks.Pleroma.Config do
end
end
def run(["reset"]) do
with true <- Pleroma.Config.get([:configurable_from_database]) do
start_pleroma()
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
_ -> configdb_not_enabled()
end
end
def run(["keydel" | dbkey]) do
unless [] == dbkey do
with true <- Pleroma.Config.get([:configurable_from_database]) do