PhoenixKit.Migrations.Postgres.V88 (phoenix_kit v1.7.118)

Copy Markdown View Source

V88: Publishing schema V2 — restructure posts/versions/contents.

Posts become a minimal routing shell. Versions become the source of truth for published state and metadata. Contents hold per-language title + body.

Changes:

  • Add active_version_uuid to posts (FK → versions, nullable)
  • Add trashed_at to posts (replaces status-based soft delete)
  • Add published_at to versions (moved from posts)
  • Add title_i18n and description_i18n JSONB to groups (for future i18n)
  • Data migration: populate new columns from existing data
  • Drop legacy post columns: scheduled_at, status, published_at, primary_language, data
  • Drop obsolete indexes (scheduled, group_status, group_published_at)
  • Add new indexes for active_version_uuid, trashed_at, and version published_at

Summary

Functions

down(opts)

up(opts)