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
|
|
@ -11,19 +11,19 @@ void main() {
|
|||
verifier = SchemaVerifier(GeneratedHelper());
|
||||
});
|
||||
|
||||
test('freshly created database matches the exported schema v12', () async {
|
||||
final schema = await verifier.schemaAt(12);
|
||||
test('freshly created database matches the exported schema v13', () async {
|
||||
final schema = await verifier.schemaAt(13);
|
||||
final db = AppDatabase(schema.newConnection());
|
||||
await verifier.migrateAndValidate(db, 12);
|
||||
await verifier.migrateAndValidate(db, 13);
|
||||
await db.close();
|
||||
});
|
||||
|
||||
// Every historical version upgrades cleanly to the current schema (v12).
|
||||
for (var from = 1; from <= 11; from++) {
|
||||
test('upgrades v$from → v12 and matches the fresh schema', () async {
|
||||
// Every historical version upgrades cleanly to the current schema (v13).
|
||||
for (var from = 1; from <= 12; from++) {
|
||||
test('upgrades v$from → v13 and matches the fresh schema', () async {
|
||||
final connection = await verifier.startAt(from);
|
||||
final db = AppDatabase(connection);
|
||||
await verifier.migrateAndValidate(db, 12);
|
||||
await verifier.migrateAndValidate(db, 13);
|
||||
await db.close();
|
||||
});
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue