mix phoenix_kit.migrate_blogging_to_publishing (phoenix_kit v1.7.71)

Copy Markdown View Source

Migrates the PhoenixKit blogging module to the new publishing module.

What this task does

Migrates settings keys from legacy names to new names:

  • blogging_enabledpublishing_enabled
  • blogging_blogspublishing_groups
  • blogging_memory_cache_enabledpublishing_memory_cache_enabled
  • blogging_render_cache_enabledpublishing_render_cache_enabled
  • blogging_render_cache_enabled_*publishing_render_cache_enabled_*

Usage

mix phoenix_kit.migrate_blogging_to_publishing
mix phoenix_kit.migrate_blogging_to_publishing --dry-run
mix phoenix_kit.migrate_blogging_to_publishing --verbose

Options

  • --dry-run - Shows what would be changed without making any changes
  • --verbose - Shows detailed output of each operation

Safety

This task is idempotent - it's safe to run multiple times:

  • If priv/publishing already exists, directory rename is skipped
  • If new settings keys already have values, those values are preserved
  • Legacy settings are not deleted (kept for backward compatibility)

Rollback

To rollback, manually:

  1. Rename priv/publishing back to priv/blogging
  2. The application will automatically read from legacy settings keys