diff options
author | Martin Kühl <martin.kuehl@gmail.com> | 2018-09-18 11:56:46 +0200 |
---|---|---|
committer | Martin Kühl <martin.kuehl@gmail.com> | 2018-09-22 07:04:01 +0200 |
commit | d94ee5cd50005a947c3c3a734b086fd5cd266c8d (patch) | |
tree | d10a745b7d18c00b26fc457f274a61f6385d6ac8 /priv/repo/migrations/20180918182427_create_push_subscriptions.exs | |
parent | c2d592c9c5db8e0392948d5fc589761f482fc4f7 (diff) | |
download | pleroma-d94ee5cd50005a947c3c3a734b086fd5cd266c8d.tar.gz pleroma-d94ee5cd50005a947c3c3a734b086fd5cd266c8d.zip |
Mastodon API: Support push subscription CRUD
Diffstat (limited to 'priv/repo/migrations/20180918182427_create_push_subscriptions.exs')
-rw-r--r-- | priv/repo/migrations/20180918182427_create_push_subscriptions.exs | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/priv/repo/migrations/20180918182427_create_push_subscriptions.exs b/priv/repo/migrations/20180918182427_create_push_subscriptions.exs new file mode 100644 index 000000000..0cc7afa54 --- /dev/null +++ b/priv/repo/migrations/20180918182427_create_push_subscriptions.exs @@ -0,0 +1,18 @@ +defmodule Pleroma.Repo.Migrations.CreatePushSubscriptions do + use Ecto.Migration + + def change do + create table("push_subscriptions") do + add :user_id, references("users", on_delete: :delete_all) + add :token_id, references("oauth_tokens", on_delete: :delete_all) + add :endpoint, :string + add :key_p256dh, :string + add :key_auth, :string + add :data, :map + + timestamps() + end + + create index("push_subscriptions", [:user_id, :token_id], unique: true) + end +end |