summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20190203185340_split_hide_network.exs
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-02-04 22:23:09 +0300
committerMaxim Filippov <colixer@gmail.com>2019-02-04 22:23:09 +0300
commitcd6606b7f69d1604a08cb31fa539cbd549591e23 (patch)
tree4b835c133ebb79bf65786212ff97b5eb8e1f2564 /priv/repo/migrations/20190203185340_split_hide_network.exs
parent16ce129e382cc5fa0cf5d86fc0785457a0dedd76 (diff)
downloadpleroma-cd6606b7f69d1604a08cb31fa539cbd549591e23.tar.gz
pleroma-cd6606b7f69d1604a08cb31fa539cbd549591e23.zip
Initialize hide_network with false
Diffstat (limited to 'priv/repo/migrations/20190203185340_split_hide_network.exs')
-rw-r--r--priv/repo/migrations/20190203185340_split_hide_network.exs1
1 files changed, 1 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190203185340_split_hide_network.exs b/priv/repo/migrations/20190203185340_split_hide_network.exs
index 9cc362d17..fd6fd940a 100644
--- a/priv/repo/migrations/20190203185340_split_hide_network.exs
+++ b/priv/repo/migrations/20190203185340_split_hide_network.exs
@@ -2,6 +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_followings}'::text[], info->'hide_network')")
execute("UPDATE users SET info = jsonb_set(info, '{hide_followers}'::text[], info->'hide_network')")
end