1 # Pleroma: A lightweight social networking server
2 # Copyright © 2017-2022 Pleroma Authors <https://pleroma.social/>
3 # SPDX-License-Identifier: AGPL-3.0-only
5 defmodule Pleroma.Repo.Migrations.UserNotificationSettingsFix do
9 execute(~s(UPDATE users
11 notification_settings = '{"followers": true, "follows": true, "non_follows": true, "non_followers": true}'::jsonb WHERE notification_settings IS NULL
14 execute("ALTER TABLE users
15 ALTER COLUMN notification_settings SET NOT NULL")