summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authorRin Toshaka <rinpatch@sdf.org>2018-12-06 18:11:22 +0100
committerRin Toshaka <rinpatch@sdf.org>2018-12-06 18:11:22 +0100
commit88f92693f25c34f8ab82d4ed809b266bf5fb9ff8 (patch)
treed6115e451d0cd98672669c6ba93921f75f21e16a /priv
parentca7b46fb3ba576fb7e67eba02654e6df9299392a (diff)
parent1d531fd2f32a7f8fff562a3122b30b8ccdccead0 (diff)
downloadpleroma-88f92693f25c34f8ab82d4ed809b266bf5fb9ff8.tar.gz
pleroma-88f92693f25c34f8ab82d4ed809b266bf5fb9ff8.zip
Merge develop
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20180918182427_create_push_subscriptions.exs18
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