deltachat / deltachat-core-rust

Delta Chat Rust Core library, used by Android/iOS/desktop apps, bindings and bots 📧
https://delta.chat/en/contribute
Other
660 stars 84 forks source link

add second device and backups fail between 1.147 and released versions #6038

Open r10s opened 3 hours ago

r10s commented 3 hours ago

"Add Second Device" and "backups" exported by current core-master will fail to work on released versions. eg. one cannot show QR codes in this case:

the reason is, again, a removed column at #5956 (foreign_id was renamed to foreign_key). again, we do not change schema in an incompatible way to not worsen UX unnecessarily. again, releases take time - in between, "Add Second Device", "Backup" etc. would fail.

the issues seems to be introduced in core 1.144 already, however, was not used in officially released versions yet.

we should do another migration and re-add foreign_id. and we should add a note to CONTRIBUTING.

unless i've overseen sth, we should not do released with the current core.

Screenshot 2024-10-12 at 15 06 30

EDIT: yes, "not deleting columns" is already common practice, however, as easy to oversee i created the meme

adbenitez commented 3 hours ago

note: was not "officially released" in the Delta Chat client but 3rd parties using stable tagged core releases already used it in release, so it shouldn't be changed in a way that assume it is not in use

r10s commented 2 hours ago

same as for the discussion at https://github.com/deltachat/deltachat-core-rust/pull/5254 , we probably just add another migration doing an ALTER TABLE tokens ADD COLUMN foreign_id INTEGER DEFAULT 0 - i just tried that manually, it fixes the issue at hand