PhoenixKit.Migrations.Postgres.V68 (phoenix_kit v1.7.71)

Copy Markdown View Source

V68: Allow NULL slug for timestamp-mode publishing posts

Timestamp-mode posts are identified by (post_date, post_time), not by slug. The NOT NULL constraint on slug was incorrectly applied to all modes.

Changes

  1. Drop NOT NULL constraint on slug column in phoenix_kit_publishing_posts
  2. Replace unique index idx_publishing_posts_group_slug with a partial index that only enforces uniqueness for slug-mode posts (where slug IS NOT NULL)
  3. Add unique index on (group_uuid, post_date, post_time) for timestamp-mode posts

All operations are idempotent.

Summary

Functions

down(opts)

up(opts)