In !1538 favorites timeline was switched to use the joined object, but
no idex on likes in the joined object was added.
### Fixed
- Not being able to pin unlisted posts
- Objects being re-embedded to activities after being updated (e.g faved/reposted). Running 'mix pleroma.database prune_objects' again is advised.
+- Favorites timeline doing database-intensive queries
- Metadata rendering errors resulting in the entire page being inaccessible
- `federation_incoming_replies_max_depth` option being ignored in certain cases
- Federation/MediaProxy not working with instances that have wrong certificate order
--- /dev/null
+defmodule Pleroma.Repo.Migrations.AddLikesIndexToObjects do
+ use Ecto.Migration
+
+ def change do
+ create_if_not_exists index(:objects, ["(data->'likes')"], using: :gin, name: :objects_likes)
+ end
+end