forked from AkkomaGang/akkoma
Remove :managed_config
option.
In practice, it was already removed half a year ago, but the description and cheatsheet entries were still there. The migration intentionally does not use ConfigDB.get_by_params, since this will break migration code as soon as we add a new field is added to ConfigDB. Closes #2086
This commit is contained in:
parent
6e70415e4a
commit
0b5e72ecf0
5 changed files with 29 additions and 8 deletions
|
@ -15,6 +15,8 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
- **Breaking:** `Pleroma.Workers.Cron.StatsWorker` setting from Oban `:crontab` (moved to a simpler implementation).
|
||||
- **Breaking:** `Pleroma.Workers.Cron.ClearOauthTokenWorker` setting from Oban `:crontab` (moved to scheduled jobs).
|
||||
- **Breaking:** `Pleroma.Workers.Cron.PurgeExpiredActivitiesWorker` setting from Oban `:crontab` (moved to scheduled jobs).
|
||||
- Removed `:managed_config` option. In practice, it was accidentally removed with 2.0.0 release when frontends were
|
||||
switched to a new configuration mechanism, however it was not officially removed until now.
|
||||
|
||||
### Changed
|
||||
- Minimum lifetime for ephmeral activities changed to 10 minutes and made configurable (`:min_lifetime` option).
|
||||
|
|
|
@ -216,7 +216,6 @@
|
|||
allow_relay: true,
|
||||
public: true,
|
||||
quarantined_instances: [],
|
||||
managed_config: true,
|
||||
static_dir: "instance/static/",
|
||||
allowed_post_formats: [
|
||||
"text/plain",
|
||||
|
|
|
@ -764,12 +764,6 @@
|
|||
"*.quarantined.com"
|
||||
]
|
||||
},
|
||||
%{
|
||||
key: :managed_config,
|
||||
type: :boolean,
|
||||
description:
|
||||
"Whenether the config for pleroma-fe is configured in this config or in static/config.json"
|
||||
},
|
||||
%{
|
||||
key: :static_dir,
|
||||
type: :string,
|
||||
|
|
|
@ -40,7 +40,6 @@ To add configuration to your config file, you can copy it from the base config.
|
|||
* `allow_relay`: Enable Pleroma’s Relay, which makes it possible to follow a whole instance.
|
||||
* `public`: Makes the client API in authenticated mode-only except for user-profiles. Useful for disabling the Local Timeline and The Whole Known Network. Note that there is a dependent setting restricting or allowing unauthenticated access to specific resources, see `restrict_unauthenticated` for more details.
|
||||
* `quarantined_instances`: List of ActivityPub instances where private (DMs, followers-only) activities will not be send.
|
||||
* `managed_config`: Whenether the config for pleroma-fe is configured in [:frontend_configurations](#frontend_configurations) or in ``static/config.json``.
|
||||
* `allowed_post_formats`: MIME-type list of formats allowed to be posted (transformed into HTML).
|
||||
* `extended_nickname_format`: Set to `true` to use extended local nicknames format (allows underscores/dashes). This will break federation with
|
||||
older software for theses nicknames.
|
||||
|
|
|
@ -0,0 +1,27 @@
|
|||
defmodule Pleroma.Repo.Migrations.RemoveManagedConfigFromDb do
|
||||
use Ecto.Migration
|
||||
import Ecto.Query
|
||||
alias Pleroma.ConfigDB
|
||||
alias Pleroma.Repo
|
||||
|
||||
def up do
|
||||
config_entry =
|
||||
from(c in ConfigDB,
|
||||
select: [:id, :value],
|
||||
where: c.group == ^:pleroma and c.key == ^:instance
|
||||
)
|
||||
|> Repo.one()
|
||||
|
||||
if config_entry do
|
||||
{_, value} = Keyword.pop(config_entry.value, :managed_config)
|
||||
|
||||
config_entry
|
||||
|> Ecto.Changeset.change(value: value)
|
||||
|> Repo.update()
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
:ok
|
||||
end
|
||||
end
|
Loading…
Reference in a new issue