diff options
author | rinpatch <rinpatch@sdf.org> | 2019-10-08 15:16:39 +0300 |
---|---|---|
committer | rinpatch <rinpatch@sdf.org> | 2019-10-08 15:16:39 +0300 |
commit | 32808208bef12996f819d21ca2635837aff98cbf (patch) | |
tree | 677e6798940b76be29771a9a574f544772c52e6b /priv/repo/migrations/20190203185340_split_hide_network.exs | |
parent | 44e0c5cabb157fe2cfc66af0167547ac51f98ff0 (diff) | |
download | pleroma-32808208bef12996f819d21ca2635837aff98cbf.tar.gz pleroma-32808208bef12996f819d21ca2635837aff98cbf.zip |
Enable `mix format` for migrations
Diffstat (limited to 'priv/repo/migrations/20190203185340_split_hide_network.exs')
-rw-r--r-- | priv/repo/migrations/20190203185340_split_hide_network.exs | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/priv/repo/migrations/20190203185340_split_hide_network.exs b/priv/repo/migrations/20190203185340_split_hide_network.exs index 8b7a9151b..fb677f68a 100644 --- a/priv/repo/migrations/20190203185340_split_hide_network.exs +++ b/priv/repo/migrations/20190203185340_split_hide_network.exs @@ -2,9 +2,17 @@ defmodule Pleroma.Repo.Migrations.SplitHideNetwork do use Ecto.Migration def up do - execute("UPDATE users SET info = jsonb_set(info, '{hide_network}'::text[], 'false'::jsonb) WHERE NOT(info::jsonb ? 'hide_network') AND local") - execute("UPDATE users SET info = jsonb_set(info, '{hide_followings}'::text[], info->'hide_network') WHERE local") - execute("UPDATE users SET info = jsonb_set(info, '{hide_followers}'::text[], info->'hide_network') WHERE local") + execute( + "UPDATE users SET info = jsonb_set(info, '{hide_network}'::text[], 'false'::jsonb) WHERE NOT(info::jsonb ? 'hide_network') AND local" + ) + + execute( + "UPDATE users SET info = jsonb_set(info, '{hide_followings}'::text[], info->'hide_network') WHERE local" + ) + + execute( + "UPDATE users SET info = jsonb_set(info, '{hide_followers}'::text[], info->'hide_network') WHERE local" + ) end def down do |