#Introduce breaking changes for my desktop app

6 messages · Page 1 of 1 (latest)

lone adder
#

We are about to publish v1 of our desktop app, and we know that in the future we might introduce big breaking changes in v2, like for example use SurrealDB instead of sqlite (current database) or something big that would make working with old db not possible, my question how can I prepare my self and my app for such big changes

Should create v1 folder inside my data_dir and when go for v2 use v2 folder and perform migration if not migrated already.

Should I use entirely different app identifier for v2
And write some function get called in the startup that would perform the migration if not migrated already.

Or there are other approaches I might want to consider?

topaz laurel
#

hmm, this is a really interesting question, that's a bit hard to answer because tauri is still so young and there weren't many (big) apps going through that scenario.

#

Changing the identifier is not a good idea in most cases i think. unless you want a complete restart, but even then it may cause problems with the installer or updater

#

so from your ideas, the versioned folder, or maybe just a small version lockfile (or registry entry) which specifies the version of the datadir

lone adder
#

Thanks @topaz laurel for your answer, your keyboard might have a problem since you have missed pressing z when you wanted to press y 3 times

topaz laurel
#

I'm using my laptop today which has a German keyboard layout which I'm not used to anymore 😅