Document Creator 0.10.0: Own tables, PhoenixKit 3 support and a settings permission
Document Creator 0.10.0 works with PhoenixKit 3: the module now builds and checks its own database tables instead of relying on core. Its settings page gets a permission of its own, and a project’s Documents tab only touches that project’s documents.
The module owns its tables
PhoenixKit 3 stops creating the module tables, so the module’s migrations now do it. A new step, V3, creates the seven phoenix_kit_doc_* tables that core used to build (categories, types, templates, documents, document sections, headers and footers, template presets) if they are missing. On a site that already has them, it changes nothing, and rolling back never drops them.
The module also hands core a description of its eight tables. With a core release that reads it, mix phoenix_kit.doctor and mix phoenix_kit.repair check these tables again, now against the module’s own migrations. Repair only adds what is missing and reports the rest.
The link from a document to a project is now added only where the phoenix_kit_projects table exists. A site without Projects gets the plain column, so the migrations no longer fail there.
A separate permission for settings
The module’s page under Settings now needs its own permission, Change Document Creator settings: choosing the Google account the module uses, browsing its Drive and changing the managed folders. Someone with only the everyday Document Creator permission is sent back to the module with You do not have permission to change Document Creator settings. The check runs again on every action on the page, not only when it opens. The Go to Settings button on the Google Account Not Connected card only shows to people who can open that page.
Every role that held the Document Creator permission before this release is given the new one once, at the first boot after the upgrade, so nobody loses access.
Project documents stay with their project
On a project’s Documents tab, attaching now accepts only a document that has no project yet, and detaching only a document linked to that project. A request from one project’s tab can no longer take or unlink another project’s document.
Upgrading
Run mix phoenix_kit.update to apply migration V3; on an existing site it is a no-op. The module now accepts PhoenixKit from 2.65.0 up to, but not including, 4.0, so core 2.65 or later is required. Check your roles afterwards: anyone who should not change the Google account or the Drive folders can have Change Document Creator settings removed while keeping the everyday permission.
Full release notes: Document Creator 0.10.0
0.10.0 · 27 October 2026
Changed
-
Core pin widened to
>= 2.65.0 and < 4.0.0: works with core 3.x (core 3.0 stops creating the module tables; this module’s own chain builds its tables). The floor is the first core with thefile_references/0andexpected_schema/0callbacks, which now carry@impl PhoenixKit.Module. -
The foreign key from
phoenix_kit_doc_documents.project_uuidtophoenix_kit_projectsis added only where that table exists. The chain used to reference it unguarded because core created it; once core stops, a host withoutphoenix_kit_projectswould have failed the chain. This package does not depend on projects (they meet through the duck-typed hub). Hosts that have projects keep the constraint; others get the plain column, and the manifest leaves the constraint out. No new version: V1 is idempotent and the column is unchanged. -
The migration chain is now V3 and adopts the seven
phoenix_kit_doc_*tables core’s V135 baseline creates for this module (categories, types, templates, documents, document sections, headers/footers, template presets):CREATE TABLE IF NOT EXISTS, guarded constraints and indexes, identical to what a fresh core builds. A no-op on every existing install; the adoption runs first inup/1, ahead of V1 and V2, which touch those tables.down/1never drops them. With it the chain builds all eight tables without core (test/integration/migrations_build_alone_test.exs, core’sModuleChainCheck). See core’sdev_docs/plans/2026-10-25-module-table-ownership.md.
Added
- The module supplies the manifest of its 8 tables (
expected_schema/0,PhoenixKitDocumentCreator.ExpectedSchema), somix phoenix_kit.repairandmix phoenix_kit.doctorcheck and repair them again, now from the module’s own chain instead of core’s manifest. Generated fromPhoenixKitDocumentCreator.Migrationsby core’sdev_docs/squash/generate_module_manifest.exs, never edited by hand. Core uses it from the first release after 2.64.1; before that nothing reads it. Repair is additive (it creates what is missing and reports the rest) and checks the tables only while the database is at the chain’s current version. No migration.
Document Creator 0.10.0. Install or update: {:phoenix_kit_document_creator, "~> 0.10"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.