summaryrefslogtreecommitdiff
path: root/priv/repo/migrations/20191005165212_add_unread_conversation_count_to_user_info.exs
blob: 0280d18ffc1ed5f1c3ccf2d6b09fa1ef99294859 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
# Pleroma: A lightweight social networking server
# Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
# SPDX-License-Identifier: AGPL-3.0-only

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