add page builder data model, cache, and block registry
Stage 1 of the page builder: Pages schema with 14 valid slugs, BlockTypes registry (26 block types with settings schemas and data loaders), Defaults module matching existing templates, ETS-backed PageCache GenServer, and Pages context (get_page/save_page/reset_page with cache -> DB -> defaults lookup). 34 tests, zero visual change. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
16
priv/repo/migrations/20260226100000_create_pages.exs
Normal file
16
priv/repo/migrations/20260226100000_create_pages.exs
Normal file
@@ -0,0 +1,16 @@
|
||||
defmodule Berrypod.Repo.Migrations.CreatePages do
|
||||
use Ecto.Migration
|
||||
|
||||
def change do
|
||||
create table(:pages, primary_key: false) do
|
||||
add :id, :binary_id, primary_key: true
|
||||
add :slug, :string, null: false
|
||||
add :title, :string, null: false
|
||||
add :blocks, :map, default: "[]"
|
||||
|
||||
timestamps(type: :utc_datetime)
|
||||
end
|
||||
|
||||
create unique_index(:pages, [:slug])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user