diff options
author | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-13 18:25:27 +0300 |
---|---|---|
committer | Roman Chvanikov <chvanikoff@pm.me> | 2019-09-13 18:25:27 +0300 |
commit | 0bd2b85edbf3b7062570778649cf2b77cc7a0bce (patch) | |
tree | ab62d01279fd01b1cbaa833aa1450d90ef952cb6 /priv | |
parent | 53a3ad60435d4f7eab2dbf1235e5974bac275aa0 (diff) | |
download | pleroma-0bd2b85edbf3b7062570778649cf2b77cc7a0bce.tar.gz pleroma-0bd2b85edbf3b7062570778649cf2b77cc7a0bce.zip |
Separate Subscription Notifications from regular Notifications
Diffstat (limited to 'priv')
-rw-r--r-- | priv/repo/migrations/20190824195028_create_subscription_notifications.exs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/priv/repo/migrations/20190824195028_create_subscription_notifications.exs b/priv/repo/migrations/20190824195028_create_subscription_notifications.exs new file mode 100644 index 000000000..fcceb4386 --- /dev/null +++ b/priv/repo/migrations/20190824195028_create_subscription_notifications.exs @@ -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 |