add activities likes index, fixes favorites API call
authorWilliam Pitcock <nenolod@dereferenced.org>
Sun, 27 Jan 2019 15:15:33 +0000 (15:15 +0000)
committerWilliam Pitcock <nenolod@dereferenced.org>
Sun, 27 Jan 2019 15:15:33 +0000 (15:15 +0000)
priv/repo/migrations/20190127151220_add_activities_likes_index.exs [new file with mode: 0644]

diff --git a/priv/repo/migrations/20190127151220_add_activities_likes_index.exs b/priv/repo/migrations/20190127151220_add_activities_likes_index.exs
new file mode 100644 (file)
index 0000000..b1822d2
--- /dev/null
@@ -0,0 +1,8 @@
+defmodule Pleroma.Repo.Migrations.AddActivitiesLikesIndex do
+  use Ecto.Migration
+  @disable_ddl_transaction true
+
+  def change do
+    create index(:activities, ["((data #> '{\"object\",\"likes\"}'))"], concurrently: true, name: :activities_likes, using: :gin)
+  end
+end