aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks
diff options
context:
space:
mode:
Diffstat (limited to 'lib/mix/tasks')
-rw-r--r--lib/mix/tasks/pleroma/config.ex13
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/mix/tasks/pleroma/config.ex b/lib/mix/tasks/pleroma/config.ex
index 675dda0d0..574f8f4be 100644
--- a/lib/mix/tasks/pleroma/config.ex
+++ b/lib/mix/tasks/pleroma/config.ex
@@ -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