diff options
author | Mark Felder <feld@FreeBSD.org> | 2020-07-12 10:38:07 -0500 |
---|---|---|
committer | Mark Felder <feld@FreeBSD.org> | 2020-07-12 10:38:07 -0500 |
commit | 133004e22d74e7cdfd13a69f88b509b395985a5d (patch) | |
tree | 3c5f4f64f964047eee339a6072261ed1fbeb16df /lib/mix/tasks/pleroma | |
parent | 11dd29ef3f9bb5b0b3109eb572c3d5ae2c830ea3 (diff) | |
download | pleroma-133004e22d74e7cdfd13a69f88b509b395985a5d.tar.gz |
Improve database config migration and add documentation
Diffstat (limited to 'lib/mix/tasks/pleroma')
-rw-r--r-- | lib/mix/tasks/pleroma/config.ex | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/mix/tasks/pleroma/config.ex b/lib/mix/tasks/pleroma/config.ex index d5129d410..343438add 100644 --- a/lib/mix/tasks/pleroma/config.ex +++ b/lib/mix/tasks/pleroma/config.ex @@ -83,7 +83,7 @@ defmodule Mix.Tasks.Pleroma.Config do defp migrate_from_db(opts) do if Pleroma.Config.get([:configurable_from_database]) do - env = opts[:env] || "prod" + env = Mix.env() config_path = if Pleroma.Config.get(:release) do @@ -105,6 +105,7 @@ defmodule Mix.Tasks.Pleroma.Config do :ok = File.close(file) System.cmd("mix", ["format", config_path]) + shell_info("Database configuration settings have been exported to config/#{env}.exported_from_db.secret.exs") else migration_error() end @@ -112,7 +113,7 @@ defmodule Mix.Tasks.Pleroma.Config do defp migration_error do shell_error( - "Migration is not allowed in config. You can change this behavior by setting `configurable_from_database` to true." + "Migration is not allowed in config. You can change this behavior by setting `config :pleroma, configurable_from_database: true`" ) end |