X-Git-Url: https://git.squeep.com/?a=blobdiff_plain;f=docs%2Fconfiguration%2Fhowto_database_config.md;h=ded9a2eb3f3aeba7d5f228f355dfc112a828c446;hb=00f9b53f07346d052adab105bde3428c98fc4660;hp=b39b75bd4332b4bc43dc207281dff23e0c902721;hpb=133004e22d74e7cdfd13a69f88b509b395985a5d;p=akkoma diff --git a/docs/configuration/howto_database_config.md b/docs/configuration/howto_database_config.md index b39b75bd4..ded9a2eb3 100644 --- a/docs/configuration/howto_database_config.md +++ b/docs/configuration/howto_database_config.md @@ -13,9 +13,21 @@ The configuration of Pleroma has traditionally been managed with a config file, 2. Run the mix task to migrate to the database. You'll receive some debugging output and a few messages informing you of what happened. + **Source:** + ``` $ mix pleroma.config migrate_to_db + ``` + + or + + **OTP:** + ``` + $ ./bin/pleroma_ctl config migrate_to_db + ``` + + ``` 10:04:34.155 [debug] QUERY OK source="config" db=1.6ms decode=2.0ms queue=33.5ms idle=0.0ms SELECT c0."id", c0."key", c0."group", c0."value", c0."inserted_at", c0."updated_at" FROM "config" AS c0 [] Migrating settings from file: /home/pleroma/config/dev.secret.exs @@ -82,9 +94,21 @@ config :pleroma, configurable_from_database: true 2. Run the mix task to migrate back from the database. You'll receive some debugging output and a few messages informing you of what happened. + **Source:** + ``` $ mix pleroma.config migrate_from_db + ``` + + or + + **OTP:** + + ``` + $ ./bin/pleroma_ctl config migrate_from_db + ``` + ``` 10:26:30.593 [debug] QUERY OK source="config" db=9.8ms decode=1.2ms queue=26.0ms idle=0.0ms SELECT c0."id", c0."key", c0."group", c0."value", c0."inserted_at", c0."updated_at" FROM "config" AS c0 [] @@ -120,8 +144,8 @@ pleroma_dev=# select * from config; ----+-----------+------------------------------------------------------------+---------------------+---------------------+---------- 1 | :instance | \x836c0000000168026400046e616d656d00000007426c65726f6d616a | 2020-07-12 15:33:29 | 2020-07-12 15:33:29 | :pleroma (1 row) -pleroma_dev=# delete from config where key = ':instance'; +pleroma_dev=# delete from config where key = ':instance' and group = ':pleroma'; DELETE 1 ``` -Now the `config :pleroma, :instance` settings have been removed from the database. \ No newline at end of file +Now the `config :pleroma, :instance` settings have been removed from the database.