Skip to content

Entities 0.1.6: Unused migration module removed

Entities 0.1.6 removes the module’s own migration module, which nothing called. Nothing changes for a running site.

The entities tables belong to core PhoenixKit: its V17 migration creates them and later core migrations change them. PhoenixKitEntities.Migrations.V1 duplicated that and had no callers, so it is gone. An app that called Migrations.V1.up/1 itself should call PhoenixKit.Migrations.up() instead.

The record form, the entity form and the Entities settings page now load their data in handle_params/3 instead of mount/3, as the entities list and the data navigator already did.

Upgrading

Only if your app calls PhoenixKitEntities.Migrations.V1 directly: switch to PhoenixKit.Migrations.up().

Full release notes: Entities 0.1.6

0.1.6 · 29 April 2026

Removed

  • PhoenixKitEntities.Migrations.V1 — dead code with zero callers in lib/, test/, or the host app. Entity tables are owned entirely by core PhoenixKit (V17 creates them; V40 / V58 / V67 / V74 / V81 evolve them). Host apps that were calling Migrations.V1.up/1 directly should switch to PhoenixKit.Migrations.up(). Note: technically a breaking change for any standalone host that imported the V1 module, but in practice no known callers exist.
  • test/support/postgres/migrations/ — 210 lines of hand-rolled DDL deleted. Test schema now built by running core’s versioned migrations directly via Ecto.Migrator.run(TestRepo, [{0, PhoenixKit.Migration}], :up, ...) — same call the host app makes in production. Schema drift between test and prod is now impossible by construction.

Changed

  • Web.DataForm, Web.EntityForm, Web.EntitiesSettings now defer DB queries from mount/3 to handle_params/3 — closes the still-open Phoenix iron-law follow-up from PR #9 across the remaining three admin LVs. All five admin LVs now compliant.
  • mount_data_form / mount_entity_form / mount_data_presence / mount_entity_presence helpers renamed to hydrate_* to reflect that they fill data assigns rather than couple to the mount/3 callback. connected?(socket) gating preserved exactly so presence still only initializes on the WebSocket pass.
  • entities_settings.ex: 8-key settings map consolidated through a private load_settings/0 helper, deduplicating the inline copy in handle_event("save", ...).

Fixed

  • Test fixtures in mirror/importer_test.exs and mix_tasks/import_test.exs updated to match the real phoenix_kit_users schema: account_type = 'person' (was 'personal', which the production CHECK constraint rejects), hashed_password non-null, inserted_at / updated_at non-null. The previous hand-rolled test migration had been more permissive than production and was masking these latent bugs.

Entities 0.1.6. Install or update: {:phoenix_kit_entities, "~> 0.1"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.