berrypod/priv/repo/migrations/20260226100000_create_pages.exs

17 lines
396 B
Elixir
Raw Permalink Normal View History

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