PhoenixKit.Modules.Publishing.Migrations.PublishingTables
(PhoenixKitPublishing v0.1.5)
Copy Markdown
View Source
Consolidated migration for the Publishing module.
Creates all 4 publishing tables in their V2 state. Every statement uses IF NOT EXISTS / IF NOT NULL guards so it is safe to run even when the tables already exist (e.g. created by PhoenixKit core migrations).
Tables
phoenix_kit_publishing_groups— content groups (blog, faq, docs, …)phoenix_kit_publishing_posts— routing shell (slug/date identity + active version pointer)phoenix_kit_publishing_versions— source of truth (status, published_at, metadata)phoenix_kit_publishing_contents— per-language content (title + body, with override columns for future use)
Design
- UUID v7 primary keys (
uuid_generate_v7()default) - JSONB
datacolumn on versions and contents for extensibility - All timestamps use
timestamptz - Slug is nullable (timestamp-mode posts use date/time instead)
- User FK columns (
created_by_uuid,updated_by_uuid) referencephoenix_kit_users(uuid)when that table exists; otherwise skipped.