Public command
market ledger-import
Copy a ledger an older release kept in a local SQLite file into the fleet database, only reading the file.
handtohuman market ledger-import --from <FILE>Accepted input
--from <FILE>Required. The SQLite ledger file an older release wrote; no path is assumed. A leading ~/ is expanded. The file is opened read-only and never changed.
What is carried, and the report
Every table of the older ledger is copied into the fleet database, parents before the rows that reference them: accounts, drafts, campaigns, offers, orders, escrows, ledger entries, disputes, ratings, payouts, API tokens, payment intents and order attempts. A row already present in the fleet database is left as it is, so the import can run again and reports what it found each time. A column the older file holds and the fleet schema has no place for is named in the report, never dropped silently.
One JSON line per table reports table, found (the rows the older file holds, null when it has no such table), imported, already_present and columns_not_carried. The global --text prints the same report as key: value lines.
Refusals
no older ledger at <path>when--fromis not a file.opening the older ledger <path> read-only: <cause>when SQLite cannot open it.reading <table> from the older ledger: <cause>for a table that exists and cannot be read; a table the file does not have is reported asfound: null, not refused.a row of <table> in the older ledger does not fit the fleet schema: <cause>— the import stops at that row and names the table; rows already written stay, because each one is its own insert that the next run recognises as present.writing a row of <table> into the fleet database: <cause>when the fleet database refuses the insert.- The fleet-database refusals of every market command when the database cannot be reached.