summaryrefslogtreecommitdiff
path: root/priv
diff options
context:
space:
mode:
authoreugenijm <eugenijm@protonmail.com>2019-10-02 00:37:08 +0300
committereugenijm <eugenijm@protonmail.com>2019-10-05 20:12:00 +0300
commit8249924485965148f3a690c5d76e5f8b3bd78940 (patch)
tree7102a7d96f2c8ccedd2a8801c0c89af58d0a3f4c /priv
parente51c20f28a91028b06a5783601e4ce09536bba5b (diff)
downloadpleroma-8249924485965148f3a690c5d76e5f8b3bd78940.tar.gz
pleroma-8249924485965148f3a690c5d76e5f8b3bd78940.zip
Mastodon API: Add `pleroma.unread_conversation_count` to the Account entity
Diffstat (limited to 'priv')
-rw-r--r--priv/repo/migrations/20191005165212_add_unread_conversation_count_to_user_info.exs11
1 files changed, 11 insertions, 0 deletions
diff --git a/priv/repo/migrations/20191005165212_add_unread_conversation_count_to_user_info.exs b/priv/repo/migrations/20191005165212_add_unread_conversation_count_to_user_info.exs
new file mode 100644
index 000000000..2aa1a012c
--- /dev/null
+++ b/priv/repo/migrations/20191005165212_add_unread_conversation_count_to_user_info.exs
@@ -0,0 +1,11 @@
+defmodule Pleroma.Repo.Migrations.AddUnreadConversationCountToUserInfo do
+ use Ecto.Migration
+
+ def up do
+ execute("""
+ update users set info = jsonb_set(info, '{unread_conversation_count}', 0::varchar::jsonb, true) where local=true
+ """)
+ end
+
+ def down, do: :ok
+end