Skip to content

Legal 0.5.0: A safety check on the consent log table, plus French and German

Legal 0.5.0 makes the module’s migration check the consent log table before taking it over, and adds French and German translations.

A shape check before adoption

Legal’s migration chain adopts the phoenix_kit_consent_logs table that core created. Until now its first step only made sure the table existed. Now, before it marks a table that has no marker yet, it reads the table’s columns, widths, nullability, indexes and primary key from Postgres and compares them with what the module expects.

If they differ, the migration stops by default with an AdoptionShapeError that lists every difference and explains how to reconcile them by hand. With config :phoenix_kit_legal, :adoption_shape_check, :warn it logs the difference and goes on instead. No column is ever changed automatically. Tables that already carry the marker skip the check, so later upgrades run as before.

French and German

The module’s texts, including the cookie banner, its categories, page titles and the admin settings, now come in French and German, next to English, Estonian and Russian.

Upgrading

Run mix phoenix_kit.update. On a table that was created by core and never changed by hand, the check passes and nothing changes. If it stops, follow the steps in the error message, or set the :warn mode if you accept the difference.

Full release notes: Legal 0.5.0

0.5.0 · 24 September 2026

Added

  • Adoption-shape check for phoenix_kit_consent_logs (#23, BeamLabEU/phoenix_kit#862). Before V1 stamps the pkl_schema:1 marker on an existing table, Migrations.up/1 now reads the table’s columns, widths, nullability, indexes and primary key from Postgres’s catalogs and diffs them against the shape parsed from its own DDL. On drift it either raises AdoptionShapeError with the exact diff and a manual reconciliation procedure (the default, :raise), or logs the diff and proceeds (:warn). Configure with config :phoenix_kit_legal, :adoption_shape_check. No column is ever altered automatically. Tables that already carry the marker skip the check, so later chain versions upgrade normally.
  • French and German translations (#21).
  • A Postgres-backed :integration test suite for the migration chain. It is excluded automatically when no database is reachable, and it refuses any database other than phoenix_kit_legal_test.

Changed

  • Rewrote AGENTS.md onto the shared module skeleton and moved the consent-log ownership record into dev_docs/guides/consent-logs-ownership.md (#22).
  • Dependency updates: phoenix_kit 2.38.1, phoenix_kit_publishing 0.11.0, phoenix_live_view 1.2.12, and the transitive set they pull.

Legal 0.5.0. Install or update: {:phoenix_kit_legal, "~> 0.5"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.