logo

pleroma

My custom branche(s) on git.pleroma.social/pleroma/pleroma git clone https://hacktivis.me/git/pleroma.git

20190412052952_add_user_info_fields.exs (512B)


  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. defmodule Pleroma.Repo.Migrations.AddEmailNotificationsToUserInfo do
  5. use Ecto.Migration
  6. def up do
  7. execute("
  8. UPDATE users
  9. SET info = info || '{
  10. \"email_notifications\": {
  11. \"digest\": false
  12. }
  13. }'")
  14. end
  15. def down do
  16. execute("
  17. UPDATE users
  18. SET info = info - 'email_notifications'
  19. ")
  20. end
  21. end