From: lain Date: Mon, 4 Nov 2019 17:13:37 +0000 (+0100) Subject: Migrations: Don't copy over mutes unless there actually are some. X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=4388255eed40c436d5931c3d0d070f3c1c9aab83;p=akkoma Migrations: Don't copy over mutes unless there actually are some. --- 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