berrypod/priv/repo/migrations/20260226100000_create_pages.exs
jamey 35f96e43a6 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>
2026-02-26 17:45:07 +00:00

17 lines
396 B
Elixir

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