Add migration: oidc_only boolean to settings table

This commit is contained in:
Moritz 2026-02-24 15:07:38 +01:00
parent 62b37b9aa2
commit adb44241d9
Signed by: moritz
GPG key ID: 1020A035E5DD0824

View file

@ -0,0 +1,20 @@
defmodule Mv.Repo.Migrations.AddOidcOnlyToSettings do
@moduledoc """
Adds oidc_only flag to settings. When true and OIDC is configured,
the sign-in page shows only OIDC (password login is hidden).
"""
use Ecto.Migration
def up do
alter table(:settings) do
add :oidc_only, :boolean, default: false, null: false
end
end
def down do
alter table(:settings) do
remove :oidc_only
end
end
end