Legal 0.3.1: The broken consent log migration template is gone
Legal 0.3.1 removes a migration file the README told you to copy into your app, which could break mix ecto.migrate.
The package shipped priv/migrations/add_phoenix_kit_consent_logs.exs, and the README’s first install step said to copy and run it. It used a plain create table, so on any site where core had already created phoenix_kit_consent_logs, which is every site, the migration failed with “table already exists”. Its string columns were also wider than core’s. The file is deleted, and the README’s step 1 now says to run mix phoenix_kit.update, as the module’s install task always did.
No code changes, and the core requirement stays ~> 2.0.
Upgrading
If you never copied the template, there is nothing to do. If you did and it ran, the README points to the module’s notes on how to handle it.
Full release notes: Legal 0.3.1
0.3.1 · 10 August 2026
Changed
-
⚠️ Requires
phoenix_kit ~> 2.0. The core pin moved to~> 2.0, so this release no longer resolves against core 1.7.Core 2.0.0 squashes the migration chain into a single
V135baseline and makes V135 the chain’s floor:mix ecto.migratenow refuses on a database below it rather than migrating. Checkmix phoenix_kit.statusbefore upgrading. A host below V135 must installphoenix_kit 1.7.236— the migration bridge, the last release carrying the full pre-squash chain — migrate until the reported version is at least V135, and only then move to 2.0.This package does not call migration internals, so the change is the pin itself.
Removed
-
priv/migrations/add_phoenix_kit_consent_logs.exs, and the README step that told you to run it. This was a third definition ofphoenix_kit_consent_logs(after core’s and the coordinator removed in 0.3.0), and the only one that could actually break an install:- It used
create table, notcreate_if_not_exists. On any host where core had already created the table — which is all of them, since core V43 —mix ecto.migratefailed withtable "phoenix_kit_consent_logs" already exists. - Every string column was the Ecto default
varchar(255), against core’svarchar(64)/(30)/(20)/(45)/(64), with Ecto-default index names — a third naming scheme distinct from core’s and the coordinator’s.
mix phoenix_kit_legal.installnever pointed at this file; it has always printedmix phoenix_kit.update, which is correct. The README and the install task had been contradicting each other. README step 1 now matches the task.If you previously ran this template successfully, your host predates core creating the table and your columns are 255-wide with Ecto-default index names.
mix phoenix_kit.doctor(core 2.0) reports the divergence andmix phoenix_kit.repairis the supported way to reconcile it. Nothing in this package will touch it. - It used
Added
test/consent_logs_ownership_test.exs— fails if amigration_module/0, a migration coordinator module, or apriv/migration template reappears, and pinsConsentLog‘s length validations to core’s exact column widths. Each regression case was verified by reintroducing the condition and confirming the test fails, not merely that it passes.- A schema-ownership section at the top of
AGENTS.md, so the next contributor sees the constraint before writing a migration.
Documentation
dev_docs/reports/2026-08-10-module-migration-versioning.mdrewritten for review by the module’s original author: the full evidence chain (commit801e66ca, V43’s original DDL, thephoenix_kit.updateordering, core’sExpectedSchema), all three DDLs side by side, and the finding that PR #8 — while correctly fixing the version-tracking protocol — made the coordinator’sDROP TABLE ... CASCADEreachable against a core-owned table for the first time.
Legal 0.3.1. Install or update: {:phoenix_kit_legal, "~> 0.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.