refactor(app): studysets and settings are written in the newest schema
Decided 2026-10-07: the codecs write the newest schema every time, as before, rather than the oldest one that holds what is there. An older app loses sight of a studyset or of the settings once a newer one has written them, until it is updated too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
a822763df8
commit
ad28a5d8c2
1 changed files with 19 additions and 26 deletions
|
|
@ -70,13 +70,13 @@ void main() {
|
|||
expect(json(payload)['schemaVersion'], studysetSchemaVersion);
|
||||
});
|
||||
|
||||
test('without study options still writes the second schema, which '
|
||||
'older apps read', () {
|
||||
test('without study options writes the third schema all the same', () {
|
||||
final payload = encodeStudysetPayload(
|
||||
StudysetContent(title: 'Japanese', description: RichContent.empty()),
|
||||
);
|
||||
|
||||
expect(json(payload)['schemaVersion'], 2);
|
||||
expect(json(payload)['schemaVersion'], 3);
|
||||
expect(json(payload).keys, isNot(contains('study')));
|
||||
});
|
||||
|
||||
test('keeps the study options', () {
|
||||
|
|
|
|||
Loading…
Reference in a new issue