berrypod/priv/repo/migrations/20260228014939_add_custom_page_fields.exs
jamey cf627bd585 add custom page data model with split changesets and CRUD context
Stage 1 of custom CMS pages. Adds type/published/meta/nav fields to
pages schema, splits changeset into system vs custom (with slug format
validation and reserved path exclusion), adds create/update/delete
functions with auto-redirect on slug change, and warms custom pages
in ETS cache. 62 pages tests, 1426 total.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-28 01:56:19 +00:00

15 lines
381 B
Elixir

defmodule Berrypod.Repo.Migrations.AddCustomPageFields do
use Ecto.Migration
def change do
alter table(:pages) do
add :type, :string, default: "system"
add :published, :boolean, default: true
add :meta_description, :string
add :show_in_nav, :boolean, default: false
add :nav_label, :string
add :nav_position, :integer
end
end
end