First
[anni] / priv / repo / migrations / 20190525071417_add_non_follows_and_non_followers_fields_to_notification_settings.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.AddNonFollowsAndNonFollowersFieldsToNotificationSettings do
6   use Ecto.Migration
7
8   def up do
9     execute("""
10     update users set info = jsonb_set(info, '{notification_settings}', '{"local": true, "remote": true, "follows": true, "followers": true, "non_follows": true, "non_followers": true}')
11     where local=true
12     """)
13   end
14
15   def down, do: :ok
16 end