Commit 5f844fd3 authored by lain's avatar lain

Migrations: Add a fixup migration for the muted_notifications

This sets info->muted_notifications to an emtpy array if it is explicitly set
to null before. This can happen when safe_jsonb_set coalesces to a jsonb null,
which will make ecto not use the default value of [] anymore because it has been
explicitly overwritten.
parent 4bab9672
defmodule Pleroma.Repo.Migrations.FixNullMutedNotificationFields do
use Ecto.Migration
def change do
execute("update users set info = safe_jsonb_set(info, '{muted_notifications}', '[]'::jsonb, true) where local = true and info->'muted_notifications' = 'null'::jsonb")
end
end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment