Dashboards 0.6.0: The module takes over its own database migrations
Dashboards 0.6.0 gives the dashboards module its own database migrations, so future changes to its table come from this package instead of PhoenixKit core. Nothing changes in the admin or on a running site.
Its own migration chain
Until now the phoenix_kit_dashboards table came only from core PhoenixKit’s migrations. The module now has a migration chain of its own. Its first step adopts the table as core already creates it: it checks the existing shape, changes nothing, and records the version pkd_schema:1 on the table. No column, index or saved dashboard is touched, and no core release is needed for this step.
Rolling the module’s migrations back never drops the table or deletes rows, because the table holds every user’s saved dashboards. There is no automatic uninstall. The README’s new “Removing this module” section gives the SQL for removing the table by hand, and warns that mix phoenix_kit.repair recreates it empty while core still lists it as required.
Upgrading
Update the dependency and run mix phoenix_kit.update. It generates a migration for the module that only records the marker. Sites without this module, and new installs, see no difference. The requirement stays at PhoenixKit 2.15 or later.
Full release notes: Dashboards 0.6.0
0.6.0 · 15 September 2026
Changed
-
phoenix_kit_dashboards’ future shape now belongs to a module-owned migration chain,PhoenixKitDashboards.Migrations, markerpkd_schema:<N>, following the canonical dual-reader protocol documented byphoenix_kit_hello_worldand used byphoenix_kit_boards/phoenix_kit_web_analytics(migrated_version/1for migration context,migrated_version_runtime/1formix phoenix_kit.update;up/1re-reads the version before changing anything). Widths (title/slug/scope) are sourced fromPhoenixKitDashboards.Schemas.Dashboard.column_widths/0— the single shape authority — never restated as a second number.Ownership unfolds in three phases:
- Phase 0 (this release) — V1 is an adoption, not a create:
core’s V133/V139 baseline still creates the table (and its
configcolumn) on every install, and V1 re-asserts that exact shape idempotently and stamps the marker. Because no shape changes, core’sExpectedSchemastays accurate — no core release is required and there is no release-ordering hazard. - Phase 1 (a future V2+) — the first real shape change requires
first adding the altered objects to core’s manifest generator’s
@excluded_exactand regeneratingExpectedSchema, then raising this package’s core floor to that release. - Phase 2 (a future core baseline squash) — once core stops creating
this table for fresh installs, V1’s
CREATE TABLEbecomes the only thing that ever creates it from scratch, which is whyup/1already ensuresuuid_generate_v7()(and itspgcryptoextension) exist rather than assuming core’s chain provided them.
down/1can never drop the table, for any target including 0. It unstamps (or re-stamps) the marker and nothing else: the rows are every user’s saved dashboard layouts, and on most installs the table is core-created. Test-pinned — no statement in either direction may matchDROP/TRUNCATE/DELETE. There is deliberately no automated uninstall path; README.md’s new “Removing this module” section gives the operator manual SQL instead.Existing hosts: upgrade, then
mix phoenix_kit.update; it generates adashboards_update_v00_to_v01.exsmigration that stampspkd_schema:1and nothing else changes. New hosts and hosts without this module: unchanged.This is the first of a planned series of similar module-owned-migration adoptions across
phoenix_kit_*packages that today rely entirely on core’s versioned chain for their own tables. - Phase 0 (this release) — V1 is an adoption, not a create:
core’s V133/V139 baseline still creates the table (and its
Fixed
- README “Removing this module” no longer promises what core undoes.
While core still owns this table’s creation, its
ExpectedSchemamarks the table required, somix phoenix_kit.repairrecreates a droppedphoenix_kit_dashboards(empty). The guide now says so, qualifies the SQL with the schema prefix, and drops the “clear the marker to stop tracking” advice — the nextmix phoenix_kit.updatesimply re-stamps it. - Corrected core-version citations (every adopted index/constraint is core V133, not V135) and two misleading comments in the migration tests.
migrated_version_runtime/1is now covered against a real database for a foreign table comment, malformedpkd_schema:markers, an absent table, and an invalid prefix (re-raised, never reported as 0).
Dashboards 0.6.0. Install or update: {:phoenix_kit_dashboards, "~> 0.6"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.