aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorlain <lain@soykaf.club>2019-11-04 18:13:37 +0100
committerlain <lain@soykaf.club>2019-11-04 18:13:37 +0100
commit4388255eed40c436d5931c3d0d070f3c1c9aab83 (patch)
tree1f8e62c69244514899313bef746dbbabd1cd139f
parent6a151e7c7f90b0aea71580e613be4ddf5a4809f5 (diff)
downloadpleroma-4388255eed40c436d5931c3d0d070f3c1c9aab83.tar.gz
Migrations: Don't copy over mutes unless there actually are some.
-rw-r--r--priv/repo/migrations/20190711042024_copy_muted_to_muted_notifications.exs2
1 files changed, 1 insertions, 1 deletions
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