Changelog
All notable changes to DoubleEntryLedger are documented here. The format
follows Keep a Changelog and the
project follows Semantic Versioning.
[0.4.0]
⚠️ Breaking changes
Upgrading from 0.3.x requires code and config changes. Each item below
includes the migration step.
-
Store list functions renamed and re-shaped. Every
*_list_all_*
andget_all_accounts_*function was replaced bylist_for_*, now
paginated via Flop. Returns changed
from[item]/{:ok, [item]}to{:ok, {[item], %Flop.Meta{}}}.Migrate: see the Function rename map
and unwrap the result at every call site:# 0.3.x accounts = AccountStore.get_all_accounts_by_instance_id(instance_id) # 0.4.0 {:ok, {accounts, _meta}} = AccountStore.list_for_instance(instance_id)
-
Pagination: offset → cursor. List functions take a
flop_params
map (%{first: n, after: cursor, filters: [...]}), not positional
(id, page, per_page).Migrate: translate
page/per_pageto Flop's:first+:after.
See the Before/After examples in the README. -
Oban instance is now named
DoubleEntryLedger.Oban. Every DEL
enqueue targets this named instance. Upgrading without updating the
config will crash at boot (Oban registers under the default name and
collides with any other Oban you run).Migrate: add
name: DoubleEntryLedger.Obanto the config:config :double_entry_ledger, Oban, name: DoubleEntryLedger.Oban, engine: Oban.Engines.Basic, queues: [double_entry_ledger: 10], repo: MyApp.Repo
-
Supervision shift in BYO-repo mode. When
:repois configured
(pointing DEL at the host's repo), DEL no longer supervises Oban or
the command queue from its own tree — the consumer must. Leaving this
out means background work silently never runs.Migrate (BYO-repo only; skip if
:repois unset):# lib/my_app/application.ex children = [ MyApp.Repo, # …other children… ] ++ DoubleEntryLedger.children()
Added
config :double_entry_ledger, repo: MyApp.Repo— point DEL at the
host application's repo (BYO-repo mode). When unset DEL falls back to
the shippedDoubleEntryLedger.Repo.DoubleEntryLedger.children/0— child specs for consumer supervisors
in BYO-repo mode (command queue + named Oban instance).DoubleEntryLedger.Telemetry.dashboard_metrics/0— recommended
Telemetry.Metricslist for Phoenix LiveDashboard.
Changed
- Pagination is powered by Flop with
cursor-based semantics. No consumerconfig :flop, repo: …needed —
DEL ships its own Flop backend internally. DoubleEntryLedger.Repois automatically supervised only in
standalone mode (no:repoconfigured). In BYO-repo mode supervision
is the consumer's responsibility viaDoubleEntryLedger.children/0.DoubleEntryLedger.Obanis registered as a named Oban instance so it
coexists with any Oban the host app runs.
Removed
- All
list_all_*andget_all_accounts_*function names on the store
modules. See the migration table in the README.