diff options
author | kaniini <ariadne@dereferenced.org> | 2019-09-27 03:51:24 +0000 |
---|---|---|
committer | kaniini <ariadne@dereferenced.org> | 2019-09-27 03:51:24 +0000 |
commit | eb9aa7aa1095de150d036839c78c402019efb4b1 (patch) | |
tree | 37c808da6ae7007d203e0de6c917d093a4d6abae /priv | |
parent | c4fbb56984d8f86df948cfd9b0f7c081d688c365 (diff) | |
parent | b736312123bd11e8ba87b8b39245c0f441ebd7fb (diff) | |
download | pleroma-eb9aa7aa1095de150d036839c78c402019efb4b1.tar.gz pleroma-eb9aa7aa1095de150d036839c78c402019efb4b1.zip |
Merge branch 'refactor/subscription' into 'develop'
Refactor subscription functionality
Closes #1130
See merge request pleroma/pleroma!1664
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 |