From 23f548dc614515800589799eeda93aae8d8ae11f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?marcin=20miko=C5=82ajczak?= Date: Tue, 10 Sep 2024 22:28:50 +0200 Subject: [PATCH] Akkoma migration: Move mastofe settings to settings store MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: marcin mikołajczak --- .../20220108213213_add_mastofe_settings.exs | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/priv/repo/optional_migrations/akkoma_rollbacks/20220108213213_add_mastofe_settings.exs b/priv/repo/optional_migrations/akkoma_rollbacks/20220108213213_add_mastofe_settings.exs index 7f98807fb6..ac22ae6594 100644 --- a/priv/repo/optional_migrations/akkoma_rollbacks/20220108213213_add_mastofe_settings.exs +++ b/priv/repo/optional_migrations/akkoma_rollbacks/20220108213213_add_mastofe_settings.exs @@ -7,6 +7,16 @@ defmodule Pleroma.Repo.Migrations.AddMastofeSettings do def up, do: :ok def down do + """ + UPDATE users SET pleroma_settings_store = jsonb_set( + pleroma_settings_store, + '{glitch-lily}', + mastofe_settings + ) + WHERE mastofe_settings IS NOT NULL; + """ + |> execute() + alter table(:users) do remove_if_exists(:mastofe_settings, :map) end