summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20190203185340_split_hide_network.exs
diff options
context:
space:
mode:
authorMaxim Filippov <colixer@gmail.com>2019-02-03 21:24:09 +0300
committerMaxim Filippov <colixer@gmail.com>2019-02-03 21:55:04 +0300
commit16ce129e382cc5fa0cf5d86fc0785457a0dedd76 (patch)
treefc51023d573cb9f08302862b7d10664ac9f4f09d /priv/repo/migrations/20190203185340_split_hide_network.exs
parent69a38644bc20f49390717f06be30cc2874f7b6f7 (diff)
downloadpleroma-16ce129e382cc5fa0cf5d86fc0785457a0dedd76.tar.gz
pleroma-16ce129e382cc5fa0cf5d86fc0785457a0dedd76.zip
Split hide_network into hide_followers & hide_followings (fixed)
Diffstat (limited to 'priv/repo/migrations/20190203185340_split_hide_network.exs')
-rw-r--r--priv/repo/migrations/20190203185340_split_hide_network.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190203185340_split_hide_network.exs b/priv/repo/migrations/20190203185340_split_hide_network.exs
new file mode 100644
index 000000000..9cc362d17
--- /dev/null
+++ b/priv/repo/migrations/20190203185340_split_hide_network.exs
@@ -0,0 +1,11 @@
+defmodule Pleroma.Repo.Migrations.SplitHideNetwork do
+ use Ecto.Migration
+
+ def up do
+ 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
+
+ def down do
+ end
+end