aboutsummaryrefslogtreecommitdiff
path: root/lib/mix/tasks
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-10-18 11:49:27 +0000
committerrinpatch <rinpatch@sdf.org>2019-10-18 11:49:27 +0000
commitdeee9f31968c48fb15b4d6b93254d28232e54a69 (patch)
treed53c7d132a53d2b510c5ac6403fb7cbdb1cf79d6 /lib/mix/tasks
parentc00797d08ef3e6c57250c9f013b6f912292b031b (diff)
parent41c47639e3eae5d5e2840e9a9bb51cd99660af91 (diff)
downloadpleroma-deee9f31968c48fb15b4d6b93254d28232e54a69.tar.gz
Merge branch 'bugfix/jsonb-set-fuckup' into 'release/1.1.1'
Fix a migration wiping user info of users that don't have any mutes See merge request pleroma/pleroma!1856
Diffstat (limited to 'lib/mix/tasks')
-rw-r--r--lib/mix/tasks/pleroma/database.ex4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/mix/tasks/pleroma/database.ex b/lib/mix/tasks/pleroma/database.ex
index bcc2052d6..ab7529e08 100644
--- a/lib/mix/tasks/pleroma/database.ex
+++ b/lib/mix/tasks/pleroma/database.ex
@@ -54,7 +54,7 @@ defmodule Mix.Tasks.Pleroma.Database do
Logger.info("Removing embedded objects")
Repo.query!(
- "update activities set data = jsonb_set(data, '{object}'::text[], data->'object'->'id') where data->'object'->>'id' is not null;",
+ "update activities set data = safe_jsonb_set(data, '{object}'::text[], data->'object'->'id') where data->'object'->>'id' is not null;",
[],
timeout: :infinity
)
@@ -152,7 +152,7 @@ defmodule Mix.Tasks.Pleroma.Database do
set: [
data:
fragment(
- "jsonb_set(?, '{likes}', '[]'::jsonb, true)",
+ "safe_jsonb_set(?, '{likes}', '[]'::jsonb, true)",
object.data
)
]