Migrates existing blog posts to the new versioned folder structure.
This task moves blog posts from the legacy flat structure to the versioned structure:
- Legacy:
blog-slug/post-slug/en.phk - Versioned:
blog-slug/post-slug/v1/en.phk
All existing posts are treated as version 1 with the appropriate metadata fields added.
Usage
mix phoenix_kit.migrate_blog_versionsOptions
--dry-run Show what would be changed without making changes
--verbose Show detailed output during migration
--blog SLUG Only migrate a specific blog (default: all blogs)Examples
# See what would be changed
mix phoenix_kit.migrate_blog_versions --dry-run
# Migrate all blogs with detailed output
mix phoenix_kit.migrate_blog_versions --verbose
# Migrate a specific blog
mix phoenix_kit.migrate_blog_versions --blog my-blogThe migration is idempotent - posts already in versioned structure are skipped.