Customer Support 0.4.0: The module takes over its own tables
Customer Support 0.4.0 gives the ticket module its own migrations for its four tables, shows ticket counts on the admin Modules page, and catches over-long values in the form instead of the database.
Its own migration chain
The tickets, comments, attachments and status history tables are still created by PhoenixKit core. From this release the module adopts them through its own migration, V1, and marks the tickets table with its version. V1 makes one real change: the “changed by” user on a status history entry may now be empty. That matches what the database already does when that user is deleted. On sites installed from PhoenixKit 2.0’s baseline the column was required, so V1 relaxes it; on older sites nothing changes.
Ticket counts on the Modules page
The module’s card on the admin Modules page now shows Total, Open and In Progress ticket counts.
Clearer errors on long values
The title, status and slug of a ticket, and the statuses in a history entry, are now checked against the column widths before saving. An over-long status no longer fails in the database; it comes back as a form error.
Upgrading
Run mix phoenix_kit.update to apply the module’s V1 migration. It needs PhoenixKit 2.4 or later, as before. The README now explains how to remove the module and its data by hand. There is no automatic uninstall, and dropping the tables is not final while core still expects them: mix phoenix_kit.repair creates them again, empty.
Full release notes: Customer Support 0.4.0
0.4.0 · 16 September 2026
Added
PhoenixKitCustomerSupport.Migrations— this module now owns and versions the future shape of its 4 tables (phoenix_kit_tickets,phoenix_kit_ticket_comments,phoenix_kit_ticket_attachments,phoenix_kit_ticket_status_history) via its own migration chain, the same pattern already shipped forphoenix_kit_posts,phoenix_kit_dashboardsandphoenix_kit_warehouse.V1adopts core’s currentV135/V168shape and stamps apkcs_schema:1marker onphoenix_kit_tickets. One real change:changed_by_uuidonphoenix_kit_ticket_status_historyis made nullable (its FK isON DELETE SET NULL, which core’sNOT NULLbaseline contradicts and V164 documents without fixing) — a no-op on hosts that already carry it nullable, anALTER COLUMN … DROP NOT NULLon hosts installed from the squashed baseline. Any legacy descriptiveCOMMENTonphoenix_kit_ticketsis replaced by the marker.
Fixed
Ticket.changeset/2andTicketStatusHistory.changeset/2now validate againstcolumn_widths/0, the same widths V1’s DDL uses, instead of a hard-coded255.from_status/to_statuswere not length-checked at all, so an over-long value raised at Postgres instead of returning a changeset error.- README “Removing this module”:
DROP TABLEis not final while core’s manifest still requires these tables (mix phoenix_kit.repairrecreates them empty), and clearing the version marker does nothing because the nextmix phoenix_kit.updatere-stamps it. SQL is now schema-qualified. - Typespecs:
Ticket.user_uuidandTicketStatusHistory.changed_by_uuidcan benil(both FKs areON DELETE SET NULL).
Customer Support 0.4.0. Install or update: {:phoenix_kit_customer_support, "~> 0.4"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.