add sort index for activities
authorRoger Braun <rbraun@Bobble.local>
Thu, 9 Nov 2017 14:16:10 +0000 (15:16 +0100)
committerRoger Braun <rbraun@Bobble.local>
Thu, 9 Nov 2017 14:16:10 +0000 (15:16 +0100)
priv/repo/migrations/20171109141309_add_sort_index_to_activities.exs [new file with mode: 0644]

diff --git a/priv/repo/migrations/20171109141309_add_sort_index_to_activities.exs b/priv/repo/migrations/20171109141309_add_sort_index_to_activities.exs
new file mode 100644 (file)
index 0000000..2d21c56
--- /dev/null
@@ -0,0 +1,8 @@
+defmodule Pleroma.Repo.Migrations.AddSortIndexToActivities do
+  use Ecto.Migration
+  @disable_ddl_transaction true
+
+  def change do
+    create index(:activities, ["id desc nulls last"], concurrently: true)
+  end
+end