diff options
| -rw-r--r-- | priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs | 12 | 
1 files changed, 12 insertions, 0 deletions
diff --git a/priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs b/priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs new file mode 100644 index 000000000..4ae3c4201 --- /dev/null +++ b/priv/repo/migrations/20200703101031_add_chat_acceptance_to_users.exs @@ -0,0 +1,12 @@ +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  | 
