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>
15 lines
381 B
Elixir
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
|