OpenGraph 0.3.6: The module runs its own migrations
OpenGraph 0.3.6 starts its own migration chain, so mix phoenix_kit.update now handles the module’s tables. Nothing visible changes.
The first migration adopts the two tables that PhoenixKit core already creates, phoenix_kit_og_templates and phoenix_kit_og_assignments. It creates them only if they are missing, checks the keys, the unique name, the foreign key and the three indexes, rebuilds an index left invalid by a crashed build, and marks the schema version in a comment on the templates table. Rolling back never drops a table.
The README gains a section on removing the module: drop the two tables by hand, assignments first.
Upgrading
Run mix phoenix_kit.update to record the module’s migration. It changes nothing in your data.
Full release notes: OpenGraph 0.3.6
0.3.6 · 17 September 2026
Added
- Module-owned migrations (#12).
migration_module/0now returnsPhoenixKitOG.Migrations, somix phoenix_kit.updatepicks the module up. V1 is pure adoption of the two tables core’s V154 still creates:CREATE TABLE IF NOT EXISTSplus catalog-shape guards for the primary keys, the name UNIQUE constraint, the FK and the 3 indexes (safe on a host that renamed tables or objects), a DROP-first self-heal for an invalid canonically named index, and apkog_schema:1marker comment onphoenix_kit_og_templates. Nothing observable changes;down/1never drops a table. README gains a “Removing this module” section. Template.column_widths/0andAssignment.column_widths/0, the single source for the varchar widths the migration DDL uses.
Changed
- Dependency lock:
phoenix_kit2.13.6 → 2.28.1, plus routine bumps.
Fixed
- Post-merge: the invalid-index migration tests fake a crashed build with
UPDATE pg_index, which only a superuser may run, so they failed under an ordinary test role. They are now tagged:requires_superuserand excluded when the role lacksrolsuper.
OpenGraph 0.3.6. Install or update: {:phoenix_kit_og, "~> 0.3"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.