PhoenixKit 1.7.51: Login works again, and orphaned media can be cleaned up
PhoenixKit 1.7.51 fixes a crash at login after the UUID migrations and lets you find and delete media files that nothing uses any more.
Signing in failed because a database check still required the old integer user_id on session tokens; migration V64 checks user_uuid instead.
On the Media page, Find orphaned lists files that no product, post, category, user or other content refers to, and Delete all orphaned removes them after a confirmation. mix phoenix_kit.cleanup_orphaned_files reports the same files and queues them for deletion with --delete. Deletion runs a minute later and skips any file that has gained a reference in the meantime. A single file can be removed with Delete File on its detail page.
In Billing, subscription plans are now Subscription Types (migration V65); the admin pages move from /admin/billing/plans to /admin/billing/subscription-types. A secondary language slug of an entity record must now be unique too. Avatars chosen as a custom field are stored by UUID.
Upgrading
Run mix phoenix_kit.update for V64 and V65. Code that calls the subscription plan functions must use the subscription type names.
Full release notes: PhoenixKit 1.7.51
1.7.51 · 26 February 2026
- Add V64 migration: fix login crash by replacing
user_idcheck constraint withuser_uuidon user tokens table - Add V65 migration: rename
SubscriptionPlantoSubscriptionType(table, columns, indexes, constraints) - Rename
SubscriptionPlanschema, context functions, events, routes, LiveViews, and workers toSubscriptionType - Add orphaned media file cleanup system
mix phoenix_kit.cleanup_orphaned_filestask with dry-run and--deletemodesDeleteOrphanedFileJobOban worker with 60s delay and orphan re-check before deletion- Orphan filter toggle and “Delete all orphaned” button in Media admin UI
- Add Delete File button with confirmation modal to Media Detail page
- Add secondary language slug uniqueness validation via JSONB query in entity data
- Rename
seed_title_in_datatoseed_translatable_fieldsin entity data form - Unify slug labels to “Slug (URL-friendly identifier)” across entity forms
- Standardize dev_docs file naming convention (
{date}-{kebab-case}-{type}.md) - Fix orphan detection crash: remove references to non-existent
phoenix_kit_shop_variantstable - Fix
String.trim(nil)crash in SQS workers when AWS credentials not configured - Fix default preload
:planto:subscription_typeinlist_subscriptions/1andlist_user_subscriptions/2 - Fix
auth.exstoring integerfile.idinstead offile.uuidfor avatar custom field - Fix
create_subscription/2dead code and key mismatch — now accepts:subscription_type_uuidas preferred key - Fix
change_subscription_type/3reading stalesubscription_type_idinstead ofsubscription_type_uuid - Fix AWS Config returning empty string instead of nil when credentials unconfigured
- Fix email log
Accessbehaviour error when called withEmailLogDatastruct - Fix
Interceptorusing deprecatedlog.idinstead oflog.uuidin header and event - Fix shop billing cascade: check
disable_system()result and log on failure - Replace
defpproxy wrappers withimportin 4 shop LiveViews (cart, catalog, checkout) - Rename
post_idtopost_uuidin 5 private post functions - Remove legacy integer ID function clauses from posts and billing modules
- Remove accidentally committed
.beamfiles, add*.beamto.gitignore - Remove empty legacy
subscription_plan_form.exandsubscription_plans.ex - Add doc notes about performance for
all_admin_tabs/0andget_config/0 - Remove dead
_plugin_session_namevariable from integration routes
PhoenixKit 1.7.51. Install or update: {:phoenix_kit, "~> 1.7"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.