diff options
author | Maxim Filippov <colixer@gmail.com> | 2019-02-05 10:22:31 +0300 |
---|---|---|
committer | Maxim Filippov <colixer@gmail.com> | 2019-02-05 10:22:31 +0300 |
commit | c48aba3c2a3e594e5d68e8b4aaa31db1823384ad (patch) | |
tree | c187ff20b7e45d9f87d4c5492ce045343fe20612 /priv/repo/migrations/20190203185340_split_hide_network.exs | |
parent | cd6606b7f69d1604a08cb31fa539cbd549591e23 (diff) | |
download | pleroma-c48aba3c2a3e594e5d68e8b4aaa31db1823384ad.tar.gz pleroma-c48aba3c2a3e594e5d68e8b4aaa31db1823384ad.zip |
Fix SQL
Diffstat (limited to 'priv/repo/migrations/20190203185340_split_hide_network.exs')
-rw-r--r-- | priv/repo/migrations/20190203185340_split_hide_network.exs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/priv/repo/migrations/20190203185340_split_hide_network.exs b/priv/repo/migrations/20190203185340_split_hide_network.exs index fd6fd940a..9c44e8aff 100644 --- a/priv/repo/migrations/20190203185340_split_hide_network.exs +++ b/priv/repo/migrations/20190203185340_split_hide_network.exs @@ -2,7 +2,7 @@ defmodule Pleroma.Repo.Migrations.SplitHideNetwork do use Ecto.Migration def up do - execute("UPDATE users SET info = '{\"hide_network\": false}'::jsonb WHERE NOT(info::jsonb ? 'hide_network')") + execute("UPDATE users SET info = jsonb_set(info, '{hide_network}'::text[], 'false'::jsonb) WHERE NOT(info::jsonb ? 'hide_network')") execute("UPDATE users SET info = jsonb_set(info, '{hide_followings}'::text[], info->'hide_network')") execute("UPDATE users SET info = jsonb_set(info, '{hide_followers}'::text[], info->'hide_network')") end |