feat(app): ask 'how did it do?' when a harvest is noted (schema v13)
The note growers most wish they had two seasons later — did it do well, was it worth keeping — never had a home. New append-only GardenOutcomes table (lotId, season year, three-face rating, free note); the question appears ONCE, inline, right after recording a harvest in the batch story, and is skippable without a trace. The answer shows as one more story line. Rides backups/sync like every mutable table (JSON codec, LWW import, HLC clock absorb). Migration v12→v13 guarded + verified from every historical version.
This commit is contained in:
parent
92fd84590b
commit
bb5b3d4a43
20 changed files with 6030 additions and 15 deletions
|
|
@ -18,6 +18,7 @@ part 'database.g.dart';
|
|||
Lots,
|
||||
GerminationTests,
|
||||
ConditionChecks,
|
||||
GardenOutcomes,
|
||||
Movements,
|
||||
Parties,
|
||||
Attachments,
|
||||
|
|
@ -31,7 +32,7 @@ class AppDatabase extends _$AppDatabase {
|
|||
|
||||
/// Current schema version; also stamped into interchange exports so an
|
||||
/// importer knows which app generation wrote the file (data-model §7).
|
||||
static const int currentSchemaVersion = 12;
|
||||
static const int currentSchemaVersion = 13;
|
||||
|
||||
@override
|
||||
int get schemaVersion => currentSchemaVersion;
|
||||
|
|
@ -187,6 +188,14 @@ class AppDatabase extends _$AppDatabase {
|
|||
await addIfMissing('return_kind', plantares.returnKind);
|
||||
await addIfMissing('work_hours', plantares.workHours);
|
||||
}
|
||||
// v13: GardenOutcomes — the per-season "how did it do in my garden"
|
||||
// answer (rating + note) captured when a harvest is recorded. Guarded
|
||||
// (see the v7 note above).
|
||||
if (from < 13) {
|
||||
if (!await _hasTable('garden_outcomes')) {
|
||||
await m.createTable(gardenOutcomes);
|
||||
}
|
||||
}
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue