summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20190325185009_create_notification_id_index.exs
diff options
context:
space:
mode:
authorrinpatch <rinpatch@sdf.org>2019-03-25 21:59:52 +0300
committerrinpatch <rinpatch@sdf.org>2019-03-25 21:59:52 +0300
commit9725c93ceaa4515299798b195db63cc9d31dd19f (patch)
tree816ba3e79e9cdfa0b4648b4693ddb032b4e1386b /priv/repo/migrations/20190325185009_create_notification_id_index.exs
parentb028b0f97d4b6310b1402b3b876aa8f8b286bc4d (diff)
downloadpleroma-9725c93ceaa4515299798b195db63cc9d31dd19f.tar.gz
pleroma-9725c93ceaa4515299798b195db63cc9d31dd19f.zip
Add an id index to notifications
Diffstat (limited to 'priv/repo/migrations/20190325185009_create_notification_id_index.exs')
-rw-r--r--priv/repo/migrations/20190325185009_create_notification_id_index.exs7
1 files changed, 7 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190325185009_create_notification_id_index.exs b/priv/repo/migrations/20190325185009_create_notification_id_index.exs
new file mode 100644
index 000000000..a6ab38d02
--- /dev/null
+++ b/priv/repo/migrations/20190325185009_create_notification_id_index.exs
@@ -0,0 +1,7 @@
+defmodule Pleroma.Repo.Migrations.CreateNotificationIdIndex do
+ use Ecto.Migration
+
+ def change do
+ create index(:notifications, ["id desc nulls last"])
+ end
+end