logo

pleroma

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

20200811125613_set_defaults_to_user_approval_pending.exs (497B)


  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.SetDefaultsToUserApprovalPending do
  5. use Ecto.Migration
  6. def up do
  7. execute("UPDATE users SET approval_pending = false WHERE approval_pending IS NULL")
  8. alter table(:users) do
  9. modify(:approval_pending, :boolean, default: false, null: false)
  10. end
  11. end
  12. def down do
  13. :ok
  14. end
  15. end