feat: add join form settings
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon 2026-03-10 14:29:49 +01:00
parent b7a83d9298
commit fa738aae88
Signed by: simon
GPG key ID: 40E7A58C4AA1EDB2
12 changed files with 846 additions and 54 deletions

View file

@ -0,0 +1,27 @@
defmodule Mv.Repo.Migrations.AddJoinFormSettingsToSettings do
@moduledoc """
Adds join form configuration columns to the settings table.
- join_form_enabled: whether the public /join page is active
- join_form_field_ids: ordered list of field IDs shown on the join form (JSONB array)
- join_form_field_required: map of field ID => required boolean (JSONB)
"""
use Ecto.Migration
def up do
alter table(:settings) do
add :join_form_enabled, :boolean, default: false, null: false
add :join_form_field_ids, {:array, :string}
add :join_form_field_required, :map
end
end
def down do
alter table(:settings) do
remove :join_form_enabled
remove :join_form_field_ids
remove :join_form_field_required
end
end
end