Merge remote-tracking branch 'remotes/origin/develop' into 2168-media-preview-proxy
[akkoma] / priv / repo / migrations / 20200703101031_add_chat_acceptance_to_users.exs
1 defmodule Pleroma.Repo.Migrations.AddChatAcceptanceToUsers do
2 use Ecto.Migration
3
4 def up do
5 alter table(:users) do
6 add(:accepts_chat_messages, :boolean, nullable: true)
7 end
8
9 execute("update users set accepts_chat_messages = true where local = true")
10 end
11
12 def down do
13 alter table(:users) do
14 remove(:accepts_chat_messages)
15 end
16 end
17 end