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.
This commit is contained in:
@@ -37,7 +37,10 @@ not speed or efficiency.
|
||||
- Database: MariaDB (protocol-compatible MySQL). Client: sqlx, with
|
||||
mysql_async as fallback. The DB server itself is out of scope; given
|
||||
connection details in config, the application creates its own tables
|
||||
from embedded migrations (schema_migrations table).
|
||||
from embedded migrations (schema_migrations table). The v1 domain
|
||||
schema (files, customers, batches, cards, transactions, invoices,
|
||||
invoice_items) is documented in Documentation/schema.sql; it is the
|
||||
initial embedded migration.
|
||||
- Config: TOML file (see config.template.toml), loaded via
|
||||
--config flag or $RUSTYRPN_CONFIG. Real config files are gitignored.
|
||||
Daemon state (pidfile, logs) and database backups default to
|
||||
|
||||
Reference in New Issue
Block a user