feat(plantare): reproduction-commitment data layer (schema v9)
The Plantare — a promise to reproduce seed and return some (data-model §2.7, the seed-domain Pledge with return_kind=similar). NOT a sale. Local-first v1: your honest ledger of commitments (from/to a person by name); the bilateral signed cross-party form is a later social-layer phase. - New Plantares table (SyncColumns): varietyId, direction (iReturn/owedToMe), counterparty, owedDescription, madeOn, dueBy, status (open/returned/ forgiven), settledOn, note. schemaVersion 8 -> 9 with a guarded createTable migration; schema exported + migration-test helper regenerated. - VarietyRepository: createPlantare / watchPlantares / watchPlantaresForVariety / setPlantareStatus / deletePlantare (soft-delete, CRDT-stamped). - Included in backups + sync: InventorySnapshot + JSON codec (round-trips isDeleted) + exportInventory/exportForSync/importInventory, so commitments survive restore and replicate LWW like every other row. Tests: v1..v8 -> v9 migration + fresh v9; repo create/list/settle/reopen/ delete; and a backup round-trip preserving a commitment. 13 green. UI (detail section + Plantares screen) follows.
This commit is contained in:
parent
0e41293de5
commit
81094f25a8
12 changed files with 5418 additions and 60 deletions
1987
apps/app_seeds/drift_schemas/drift_schema_v9.json
Normal file
1987
apps/app_seeds/drift_schemas/drift_schema_v9.json
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Add table
Add a link
Reference in a new issue