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
