Hello World 0.2.1: How a module takes over a table core already creates
Hello World 0.2.1 adds the missing chapter to the PhoenixKit module template’s migration guide: how a module takes over a table that core already creates, without breaking existing sites.
The guide, in the migration template and the README, describes three phases. First, the module’s V1 adopts the table and changes nothing: it creates it only if it is missing, with core’s exact names, and writes a namespaced version marker. The first change to the table’s shape comes later, and core stops creating it at its next migration squash. The guide forbids a migration that drops the table when the module is absent, since it would destroy data on a site that only removed the package. phoenix_kit_legal 0.4.0 is named as the working example.
The package also adds an optional rustler dependency, so MDEx can build from source on an OTP version without a matching precompiled library. Nothing changes on a running site.
Full release notes: Hello World 0.2.1
0.2.1 · 11 August 2026
Added
-
The core-table adoption protocol (#36) — the missing chapter of the migration template: how a module extracts a table that core already creates. Phase 0, the module’s V1 adopts and changes nothing (shape-identical
CREATE TABLE IF NOT EXISTSwith core’s exact object names plus a namespaced marker), so core’sExpectedSchemastays accurate and no core release is needed. Phase 1, the first shape change is when core moves. Phase 2, creation leaves core at the next baseline squash. Documented in all three of the repo’s canonical places, withphoenix_kit_legal0.4.0 as the live reference.Called out as forbidden: a conditional “module absent → drop the table” migration. It is nondeterministic against the manifest, the chain hash and the squash oracles, and it destroys data on a host that merely removed the package.
Changed
- Carries core’s rustler escape hatch (
{:rustler, ">= 0.0.0", optional: true}) so MDEx’s NIF builds from source on OTP versions shipping no compatible precompiled NIF.
Hello World 0.2.1. Install or update: {:phoenix_kit_hello_world, "~> 0.2"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.