pleroma/priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs

13 lines
356 B
Elixir
Raw Normal View History

defmodule Pleroma.Repo.Migrations.AddChatAcceptanceToUsers do
use Ecto.Migration
def change do
alter table(:users) do
add(:accepts_chat_messages, :boolean, nullable: false, default: false)
end
# Looks stupid but makes the update much faster
execute("update users set accepts_chat_messages = local where local = true")
end
end