From 15d12a69a4ac627d7c28226234645a23360279a5 Mon Sep 17 00:00:00 2001
From: William Pitcock <nenolod@dereferenced.org>
Date: Sun, 27 Jan 2019 15:15:33 +0000
Subject: [PATCH] add activities likes index, fixes favorites API call

---
 .../20190127151220_add_activities_likes_index.exs         | 8 ++++++++
 1 file changed, 8 insertions(+)
 create mode 100644 priv/repo/migrations/20190127151220_add_activities_likes_index.exs

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
index 000000000..b1822d265
--- /dev/null
+++ b/priv/repo/migrations/20190127151220_add_activities_likes_index.exs
@@ -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