Added index on [:target_id, :relationship_type] to :user_relationships (speeds up Notification.exclude_blockers/_).

This commit is contained in:
Ivan Tashkinov 2021-12-29 11:41:21 +03:00
parent a61ed5c488
commit 0c7fb520bf

View File

@ -0,0 +1,9 @@
defmodule Pleroma.Repo.Migrations.UserRelationshipsTargetIdRelationshipTypeIndex do
use Ecto.Migration
def change do
create_if_not_exists(
index(:user_relationships, [:target_id, :relationship_type])
)
end
end