def run(["migrate_to_db"]) do
start_pleroma()
- if Pleroma.Config.get([:instance, :dynamic_configuration]) do
+ if Pleroma.Config.get([:configurable_from_database]) do
Enum.each(@groups, &load_and_create(&1))
else
Mix.shell().info(
aliases: [d: :delete_from_db]
)
- with {:active?, true} <- {:active?, Pleroma.Config.get([:instance, :dynamic_configuration])},
+ with {:active?, true} <-
+ {:active?, Pleroma.Config.get([:configurable_from_database])},
env_path when is_binary(env_path) <- opts[:env],
config_path <- "config/#{env_path}.exported_from_db.secret.exs",
{:ok, file} <- File.open(config_path, [:write, :utf8]) do
group
|> Application.get_all_env()
|> Enum.reject(fn {k, _v} ->
- k in [Pleroma.Repo, :env] or (group == :phoenix and k == :serve_endpoints)
+ k in [Pleroma.Repo, :env, :configurable_from_database] or
+ (group == :phoenix and k == :serve_endpoints)
end)
|> Enum.each(fn {key, value} ->
key = inspect(key)