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>
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
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
|
||||
Reference in New Issue
Block a user