Skip to content

Billing 0.15.0: The module takes ownership of its tables

Billing 0.15.0 moves the remaining billing tables under the module’s own migration chain. No change for a running site: nothing in the admin or the shop looks or behaves differently.

Ten tables adopted

Migration V4 adopts the billing profiles, currencies, invoices, orders, transactions, payment methods, subscriptions, webhook events, payment options and subscription types tables, under the names core already uses. Where core already created them, V4 changes nothing in the database and only records that the module now owns them. On a database without them, it creates them.

Safer migration calls

Asking the chain for a version it does not have is now refused, instead of writing a marker that would hide every later version. A request for a specific version is honoured whichever way the options are passed, and the schema prefix is checked by the same rule core uses.

Upgrading

Run mix phoenix_kit.update to apply V4. Nothing else changes.

Full release notes: Billing 0.15.0

0.15.0 · 9 September 2026

Migration chain hardening plus V4 adoption of the ten remaining core-baseline tables (PR #39).

Added

  • V4 adopts phoenix_kit_billing_profiles, phoenix_kit_currencies, phoenix_kit_invoices, phoenix_kit_orders, phoenix_kit_transactions, phoenix_kit_payment_methods, phoenix_kit_subscriptions, phoenix_kit_webhook_events, phoenix_kit_payment_options and phoenix_kit_subscription_types under core’s exact object names — the same pure-adoption contract V1 already established for phoenix_kit_payment_provider_configs. A no-op on any host where core already created these tables; creates them on a future baseline that doesn’t. current_version/0 is now 4.

Fixed

  • up_statements/2/down_statements/2 reject an out-of-range :version target instead of silently clamping it — a hand-written call passing a too-high target used to stamp a pkb_schema: marker the chain doesn’t have, permanently hiding every later real version.
  • up/1/down/1 now read :version from a map opts as well as a keyword list; a map-shaped call used to silently default to the latest (or oldest) version instead of the one requested.
  • up_statements(prefix, 0) no longer raises FunctionClauseError — “apply up to version 0” is now a defined no-op.
  • The schema-prefix fallback validator (used when core’s own validate_prefix!/1 isn’t loaded) now matches core’s rule byte-for-byte (lower-case only, 20-byte cap) instead of a looser, uppercase-permitting, unbounded regex.

Billing 0.15.0. Install or update: {:phoenix_kit_billing, "~> 0.15"}, then mix deps.get && mix phoenix_kit.update. Full history: CHANGELOG.