logo

pleroma

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

20200703101031_add_chat_acceptance_to_users.exs (534B)


  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.AddChatAcceptanceToUsers do
  5. use Ecto.Migration
  6. def up do
  7. alter table(:users) do
  8. add(:accepts_chat_messages, :boolean, nullable: true)
  9. end
  10. execute("update users set accepts_chat_messages = true where local = true")
  11. end
  12. def down do
  13. alter table(:users) do
  14. remove(:accepts_chat_messages)
  15. end
  16. end
  17. end