summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2020-05-27 13:45:14 +0000
committerrinpatch <rinpatch@sdf.org>2020-06-08 00:58:31 +0300
commit3687788cf2ab91f6f40f76f9a82c448c477b1fec (patch)
tree6aa8e806db14befcce403b6b0681603cbe6da3ef /priv
parentf10b40828fd5f1e4fc7c4ffa9deb543d6a18eb17 (diff)
downloadpleroma-3687788cf2ab91f6f40f76f9a82c448c477b1fec.tar.gz
pleroma-3687788cf2ab91f6f40f76f9a82c448c477b1fec.zip
Merge branch 'notification-fixes' into 'develop'
Notification performance fixes See merge request pleroma/pleroma!2595
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20200527104138_change_notification_user_index.exs8
1 files changed, 8 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200527104138_change_notification_user_index.exs b/priv/repo/migrations/20200527104138_change_notification_user_index.exs
new file mode 100644
index 000000000..4dcfe6de9
--- /dev/null
+++ b/priv/repo/migrations/20200527104138_change_notification_user_index.exs
@@ -0,0 +1,8 @@
+defmodule Pleroma.Repo.Migrations.ChangeNotificationUserIndex do
+ use Ecto.Migration
+
+ def change do
+ drop_if_exists(index(:notifications, [:user_id]))
+ create_if_not_exists(index(:notifications, [:user_id, "id desc nulls last"]))
+ end
+end