This commit is contained in:
parent
b7a83d9298
commit
fa738aae88
12 changed files with 846 additions and 54 deletions
|
|
@ -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
|
||||
Loading…
Add table
Add a link
Reference in a new issue