Persist notification group keys
This commit is contained in:
parent
1e65c7a69e
commit
add3844c6d
10 changed files with 505 additions and 116 deletions
|
|
@ -0,0 +1,15 @@
|
|||
defmodule Pleroma.Repo.Migrations.AddGroupKeyToNotifications do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
alter table(:notifications) do
|
||||
add(:group_key, :string)
|
||||
end
|
||||
|
||||
create_if_not_exists(
|
||||
index(:notifications, [:user_id, :group_key, "id desc nulls last"],
|
||||
where: "group_key IS NOT NULL"
|
||||
)
|
||||
)
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue