From 4388255eed40c436d5931c3d0d070f3c1c9aab83 Mon Sep 17 00:00:00 2001 From: lain Date: Mon, 4 Nov 2019 18:13:37 +0100 Subject: [PATCH] Migrations: Don't copy over mutes unless there actually are some. --- .../20190711042024_copy_muted_to_muted_notifications.exs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/priv/repo/migrations/20190711042024_copy_muted_to_muted_notifications.exs b/priv/repo/migrations/20190711042024_copy_muted_to_muted_notifications.exs index a3c5b52de..c0d6b3a87 100644 --- a/priv/repo/migrations/20190711042024_copy_muted_to_muted_notifications.exs +++ b/priv/repo/migrations/20190711042024_copy_muted_to_muted_notifications.exs @@ -3,6 +3,6 @@ defmodule Pleroma.Repo.Migrations.CopyMutedToMutedNotifications do alias Pleroma.User def change do - execute("update users set info = safe_jsonb_set(info, '{muted_notifications}', info->'mutes', true) where local = true") + execute("update users set info = safe_jsonb_set(info, '{muted_notifications}', info->'mutes', true) where local = true and info->'mutes' is not null") end end