feat(plantare): schema v12 — bilateral signed columns + repo
Adds the deferred bilateral columns to Plantares (plantare-bilateral.md §"Schema delta"), all nullable/defaulted so v1 local rows coexist untouched: - pledgeId (the shared id both parties key their row by), debtorKey / creditorKey, debtorSignature / creditorSignature, movementId (the shared hand-over Movement for the provenance DAG), remoteState (proposed/accepted/declined — the handshake, distinct from status), returnKind (similar/workHours/other, default similar) + workHours. Repo: createPlantare grows optional bilateral params; plantareByPledgeId looks a row up by the shared id; applyPlantareSignatures counter-stamps an incoming accept; setPlantareRemoteState records a decline. The JSON codec carries every new field so they ride backups. Versioned migration is guarded/idempotent like the others; schema v12 dumped, test helper regenerated, migration test covers v1..v11 → v12. db + data + services 295/295 green.
This commit is contained in:
parent
3f622f7bf7
commit
01fba40ec2
11 changed files with 5322 additions and 17 deletions
|
|
@ -15,6 +15,7 @@ import 'schema_v8.dart' as v8;
|
|||
import 'schema_v9.dart' as v9;
|
||||
import 'schema_v10.dart' as v10;
|
||||
import 'schema_v11.dart' as v11;
|
||||
import 'schema_v12.dart' as v12;
|
||||
|
||||
class GeneratedHelper implements SchemaInstantiationHelper {
|
||||
@override
|
||||
|
|
@ -42,10 +43,12 @@ class GeneratedHelper implements SchemaInstantiationHelper {
|
|||
return v10.DatabaseAtV10(db);
|
||||
case 11:
|
||||
return v11.DatabaseAtV11(db);
|
||||
case 12:
|
||||
return v12.DatabaseAtV12(db);
|
||||
default:
|
||||
throw MissingSchemaException(version, versions);
|
||||
}
|
||||
}
|
||||
|
||||
static const versions = const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11];
|
||||
static const versions = const [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12];
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue