mix phoenix_kit.update (phoenix_kit v1.4.4)
View SourceUpdates PhoenixKit to the latest version.
This task handles updating an existing PhoenixKit installation to the latest version by creating upgrade migrations that preserve existing data while adding new features.
The update process also automatically:
- Updates CSS configuration (enables daisyUI themes if disabled)
- Rebuilds assets using the Phoenix asset pipeline
- Applies database migrations (with optional interactive prompt)
Usage
$ mix phoenix_kit.update
$ mix phoenix_kit.update --prefix=myapp
$ mix phoenix_kit.update --status
$ mix phoenix_kit.update --skip-assets
$ mix phoenix_kit.update -y
Options
--prefix- Database schema prefix (default: "public")--status- Show current installation status and available updates--force- Force update even if already up to date--skip-assets- Skip automatic asset rebuild check--yes/-y- Skip confirmation prompts and run migrations automatically
Examples
# Update PhoenixKit to latest version
mix phoenix_kit.update
# Check what version is installed and what updates are available
mix phoenix_kit.update --status
# Update with custom schema prefix
mix phoenix_kit.update --prefix=auth
# Update without prompts (useful for CI/CD)
mix phoenix_kit.update -y
# Force update with automatic migration
mix phoenix_kit.update --force -yVersion Management
PhoenixKit uses a versioned migration system similar to Oban. Each version contains specific database schema changes that can be applied incrementally.
Current version: V07 (latest version with comprehensive features)
- V01: Basic authentication with role system
- V02: Remove is_active column from role assignments (direct deletion)
- V03-V07: Additional features and improvements (see migration files for details)
Safe Updates
All PhoenixKit updates are designed to be:
- Non-destructive (existing data is preserved)
- Backward compatible (existing code continues to work)
- Idempotent (safe to run multiple times)
- Rollback-capable (can be reverted if needed)