Akkoma migration: Move mastofe settings to settings store

Signed-off-by: marcin mikołajczak <git@mkljczk.pl>
This commit is contained in:
marcin mikołajczak 2024-09-10 22:28:50 +02:00
parent 687e67b711
commit 23f548dc61

View file

@ -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