From: Egor Kislitsyn Date: Tue, 11 Aug 2020 13:21:17 +0000 (+0400) Subject: Set `users.approval_pending` default to `false` X-Git-Url: https://git.squeep.com/?a=commitdiff_plain;h=304ed357436522f73036c912eaaa8d8e38e1d469;p=akkoma Set `users.approval_pending` default to `false` --- diff --git a/priv/repo/migrations/20200811125613_set_defaults_to_user_approval_pending.exs b/priv/repo/migrations/20200811125613_set_defaults_to_user_approval_pending.exs new file mode 100644 index 000000000..eec7da03f --- /dev/null +++ b/priv/repo/migrations/20200811125613_set_defaults_to_user_approval_pending.exs @@ -0,0 +1,15 @@ +defmodule Pleroma.Repo.Migrations.SetDefaultsToUserApprovalPending do + use Ecto.Migration + + def up do + execute("UPDATE users SET approval_pending = false WHERE approval_pending IS NULL") + + alter table(:users) do + modify(:approval_pending, :boolean, default: false, null: false) + end + end + + def down do + :ok + end +end