feat: allow disabling registration
Some checks failed
continuous-integration/drone/push Build is failing
Some checks failed
continuous-integration/drone/push Build is failing
This commit is contained in:
parent
eb18209669
commit
09e4b64663
14 changed files with 344 additions and 5 deletions
|
|
@ -0,0 +1,20 @@
|
|||
defmodule Mv.Repo.Migrations.AddRegistrationEnabledToSettings do
|
||||
@moduledoc """
|
||||
Adds registration_enabled flag to settings. When false, direct registration
|
||||
via /register is disabled; sign-in and join form remain available.
|
||||
"""
|
||||
|
||||
use Ecto.Migration
|
||||
|
||||
def up do
|
||||
alter table(:settings) do
|
||||
add :registration_enabled, :boolean, default: true, null: false
|
||||
end
|
||||
end
|
||||
|
||||
def down do
|
||||
alter table(:settings) do
|
||||
remove :registration_enabled
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue