1147-Migrate_old_table_notes
Description
On the version update of the /e/OS Notes app, the NOTES
table has become deprecated & is replaced by the Note
table. But local notes (which are not synced in the cloud) failed to auto-migrate to the new table. This MR pulls the missing notes from the old table & migrates over to the new table.
Screenshots
Technical details
As the NOTES
table is not added to the room DB entity list, adding now will
clean all current data & recreate the table.
To bypass this, we need to retrieve old table data via raw-SQL.
The note is missing, is checked by comparing the NOTES
table's note content & note title
with the Note
table's notes.
Tests
- setup /e/OS Notes app in <=
1.8
build. - disable notes sync from the /e/OS Settings ->
accounts
-> -> account sync -> notes - add some new notes / edit existing notes in the /e/OS Notes. See, the notes are not synced (syncing icon showing beside the star icon, meaning syncing is pending).
- update the os to the patched version.
- open /e/OS Notes app. Check the non-synced notes are available in the list.