aboutsummaryrefslogtreecommitdiff
path: root/priv/repo/migrations
diff options
context:
space:
mode:
authorMark Felder <feld@FreeBSD.org>2020-06-26 11:24:28 -0500
committerMark Felder <feld@FreeBSD.org>2020-06-26 11:24:28 -0500
commitfd5e797379155e5a85deb88dc79f8fbca483948e (patch)
treebf7790ebc43a79cdb87815b0de271126fb9fe606 /priv/repo/migrations
parentb950fb01db51f14a9fd3a827b90573418a5b95da (diff)
downloadpleroma-fd5e797379155e5a85deb88dc79f8fbca483948e.tar.gz
Simplify notification filtering settings further
Diffstat (limited to 'priv/repo/migrations')
-rw-r--r--priv/repo/migrations/20200528160439_users_update_notification_settings.exs43
1 files changed, 0 insertions, 43 deletions
diff --git a/priv/repo/migrations/20200528160439_users_update_notification_settings.exs b/priv/repo/migrations/20200528160439_users_update_notification_settings.exs
deleted file mode 100644
index 561f7a2c4..000000000
--- a/priv/repo/migrations/20200528160439_users_update_notification_settings.exs
+++ /dev/null
@@ -1,43 +0,0 @@
-defmodule Pleroma.Repo.Migrations.UsersUpdateNotificationSettings do
- use Ecto.Migration
-
- def up do
- execute(
- "UPDATE users SET notification_settings = notification_settings - 'followers' || jsonb_build_object('from_followers', notification_settings->'followers')
-where notification_settings ? 'followers'
-and local"
- )
-
- execute(
- "UPDATE users SET notification_settings = notification_settings - 'follows' || jsonb_build_object('from_following', notification_settings->'follows')
-where notification_settings ? 'follows'
-and local"
- )
-
- execute(
- "UPDATE users SET notification_settings = notification_settings - 'non_followers' || jsonb_build_object('from_strangers', notification_settings->'non_followers')
-where notification_settings ? 'non_followers'
-and local"
- )
- end
-
- def down do
- execute(
- "UPDATE users SET notification_settings = notification_settings - 'from_followers' || jsonb_build_object('followers', notification_settings->'from_followers')
-where notification_settings ? 'from_followers'
-and local"
- )
-
- execute(
- "UPDATE users SET notification_settings = notification_settings - 'from_following' || jsonb_build_object('follows', notification_settings->'from_following')
-where notification_settings ? 'from_following'
-and local"
- )
-
- execute(
- "UPDATE users SET notification_settings = notification_settings - 'from_strangers' || jsonb_build_object('non_follows', notification_settings->'from_strangers')
-where notification_settings ? 'from_strangers'
-and local"
- )
- end
-end