Commit Graph
2 Commits
Author SHA1 Message Date
jakob d1af440966 schema: correct slim-projection count in header comment
The transactions table keeps 9 of the 16 source fields; the dropped
list also includes Card type (equals Card number in all samples, per
readme). Header said 10 and omitted Card type.
2026-09-08 14:57:29 +02:00
jakob 8e3207b139 Document v1 domain schema; clarify transaction read and import verify
Move the untracked 'schema draft.sql' to Documentation/schema.sql: the
agreed v1 fuel-domain schema (files, customers, batches, cards,
transactions, invoices, invoice_items), design decisions recorded in the
header: NULL-able cleartext card PINs, slim ledger projection (10 of 16
source fields, the files table is the canonical archive), string customer
business key, unified DECIMAL SEK money, full invoice traceability,
cli.md status values.

cli.md: transaction read takes <date> <receipt> -- the register's
receipt counter repeats across days (9,990 distinct receipts in the
138k-row sample), the day+receipt pair is the ledger dedup key, verified
unique in all samples. File import step 5 clarified as an internal
consistency check, since source files carry no totals of their own.
Invoice business key corrected to invoice number.

readme.md: point the database bullet at Documentation/schema.sql.
2026-09-02 16:38:07 +02:00