Skip to content

Commit

Permalink
Add rich text notes class and migration (#354)
Browse files Browse the repository at this point in the history
* [303] feat: add rich text notes class and migration

* [303] style: fix comment
  • Loading branch information
maelchiotti committed Jan 12, 2025
1 parent 3ed31df commit 9f71245
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions lib/services/migration/migration_service.dart
Original file line number Diff line number Diff line change
Expand Up @@ -37,14 +37,14 @@ class MigrationService {
final richTextNotes = oldNotes
.map(
(oldNote) => RichTextNote(
deleted: oldNote.deleted,
pinned: oldNote.pinned,
createdTime: oldNote.createdTime,
editedTime: oldNote.editedTime,
title: oldNote.title,
content: oldNote.content,
),
)
deleted: oldNote.deleted,
pinned: oldNote.pinned,
createdTime: oldNote.createdTime,
editedTime: oldNote.editedTime,
title: oldNote.title,
content: oldNote.content,
),
)
.toList();

// Add the new notes to the new collection with their labels
Expand All @@ -55,8 +55,8 @@ class MigrationService {
final oldNotesCount = await _databaseService.database.notes.count();
final addedRichTextNotesCount = richTextNotes.length;
assert(
oldNotesCount == addedRichTextNotesCount,
'The count of old notes ($oldNotesCount) is different from the count of rich text notes ($addedRichTextNotesCount) after the migration to v2',
oldNotesCount == addedRichTextNotesCount,
'The count of old notes ($oldNotesCount) is different from the count of rich text notes ($addedRichTextNotesCount) after the migration to v2',
);

// Update the database version
Expand Down

0 comments on commit 9f71245

Please sign in to comment.