0280d18ffc1ed5f1c3ccf2d6b09fa1ef99294859
[anni] / priv / repo / migrations / 20191005165212_add_unread_conversation_count_to_user_info.exs
1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
4
5 defmodule Pleroma.Repo.Migrations.AddUnreadConversationCountToUserInfo do
6   use Ecto.Migration
7
8   def up do
9     execute("""
10     update users set info = jsonb_set(info, '{unread_conversation_count}', 0::varchar::jsonb, true) where local=true
11     """)
12   end
13
14   def down, do: :ok
15 end