V59: Publishing Module — Database Tables
Creates core publishing tables (4 tables) to support the filesystem-to-database migration of the Publishing module. Social features (likes, views) are deferred to later migrations.
Tables
phoenix_kit_publishing_groups— Content groups (blog, faq, legal, etc.)phoenix_kit_publishing_posts— Posts within groupsphoenix_kit_publishing_versions— Version history per postphoenix_kit_publishing_contents— Per-language content per version
Design
- JSONB
datacolumn on every table for extensibility without future migrations - Real columns for indexed/queried/FK fields (status, slug, language, dates)
- UUID v7 primary keys with
uuid_generate_v7()default - Dual-write user FKs:
created_by_uuid(UUID, FK) +created_by_id(bigint, no FK) - All timestamps use
timestamptz(per V58 standardization) - One content row per language (mirrors filesystem one-file-per-language model)
- Per-group feature toggles stored in
dataJSONB (comments_enabled, likes_enabled, etc.)
Idempotency
All CREATE TABLE and CREATE INDEX use IF NOT EXISTS. Safe to re-run.