Migrations: Make user_id index on notifications better for query.
This commit is contained in:
parent
b8e029b5ea
commit
73f222d76a
|
@ -0,0 +1,8 @@
|
|||
defmodule Pleroma.Repo.Migrations.ChangeNotificationUserIndex do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
drop_if_exists(index(:notifications, [:user_id]))
|
||||
create_if_not_exists(index(:notifications, [:user_id, "id desc nulls last"]))
|
||||
end
|
||||
end
|
Loading…
Reference in New Issue