Separate Subscription Notifications from regular Notifications

This commit is contained in:
Roman Chvanikov 2019-09-13 18:25:27 +03:00
commit 0bd2b85edb
14 changed files with 670 additions and 12 deletions

View file

@ -0,0 +1,15 @@
defmodule Pleroma.Repo.Migrations.CreateSubscriptionNotifications do
use Ecto.Migration
def change do
create_if_not_exists table(:subscription_notifications) do
add(:user_id, references(:users, type: :uuid, on_delete: :delete_all))
add(:activity_id, references(:activities, type: :uuid, on_delete: :delete_all))
timestamps()
end
create_if_not_exists(index(:subscription_notifications, [:user_id]))
create_if_not_exists(index(:subscription_notifications, ["id desc nulls last"]))
end
end