Catalogue 0.27.0: The module now owns its database tables
Catalogue 0.27.0 takes over its own database tables from PhoenixKit core. Nothing changes in the admin or on the site.
The catalogue’s eighteen tables were created by core’s migrations. The module now has its own migration, V1, which mix phoenix_kit.update finds and runs. On an existing site every table is already in place, so V1 only records that the module now owns them; no table is changed or dropped. Future changes to the catalogue’s tables will come with the module instead of with a core release.
The version number the module reports is correct again; 0.26.0 reported itself as 0.25.0.
Upgrading
Run mix phoenix_kit.update after updating the dependency, so the V1 marker is recorded.
Full release notes: Catalogue 0.27.0
0.27.0 · 5 September 2026
Added
- Module-owned V1 migration chain (#95) —
PhoenixKitCatalogue.Migrationsimplements the decentralized-migrations protocol core’smix phoenix_kit.updatediscovers viamigration_module/0(current_version/0+migrated_version_runtime/1+ idempotentup/1+ version-awaredown/1). V01 is purely ADOPTIVE: all eighteenphoenix_kit_cat_*tables already exist on live installs, so everyCREATE TABLE IF NOT EXISTS, guardedDO $$ … pg_constraint … $$block andCREATE INDEX IF NOT EXISTSis a no-op and the only new object is thepkc_schema:1marker onphoenix_kit_cat_catalogues. On a fresh install whose core baseline no longer creates these tables, the same statements build them with core’s exact object names.down/1only rewrites the marker — it never drops a table. - A drift lock against core’s schema manifest (#95) — two tests resolve
PhoenixKit.Migrations.ExpectedSchemaand assert that every one of the 275:requiredobjects it tagsowner: :catalogueis emitted byup_statements/1, and that the 3:legacy_optionalforeign keys core’s V179/V180 dropped are not re-created. Without this a core release that reshapes an adopted table would leave the chain silently building the older shape on fresh installs, with the suite still green.
Fixed
PhoenixKitCatalogue.version/0reported0.25.0on 0.26.0 — the two version sourcesAGENTS.mdrequires bumping together drifted apart at the 0.26.0 release.mix precommitdoes not run the suite, so the pin intest/phoenix_kit_catalogue_test.exsthat exists to catch exactly this never ran before publish. Both sources now read0.27.0.
Changed
AGENTS.md’s “No DB migrations in this repo” hard boundary is gone — it became false with this PR and would have sent the next contributor to write a core migration for a column this module now owns. Replaced with the chain’s actual rules: a new column means a new chain version here (V2+), a shape-changing version must clear the excluded-object protocol first, statements stay idempotent, anddown/1never drops.Migrations’ moduledoc now names all nine core versions that shape the adopted tables, not just the four that create them (V146/V151/V178/V179/V180 reshape them), and states whyforeign_keys/2deliberately omits the three foreign keys V179/V180 dropped.
Catalogue 0.27.0. Install or update: {:phoenix_kit_catalogue, "~> 0.27"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.