-
Notifications
You must be signed in to change notification settings - Fork 1k
add upgrade code for persistence layer upgrades #5431
base: master
Are you sure you want to change the base?
Conversation
5755028
to
8ca11f4
Compare
{ | ||
assert(!curVersion.isEmpty()); | ||
|
||
if(curVersion < "1.17.0" && !upgradeFrom_1_16_3()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Version strings can be compared wrong. "10.1" < "1.2"
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I suspected this solution is to simple to be good -_-
I suggest instead of hardcored
ADDED: Instead of abstract class
|
Or even better use not version, but incremental number. Otherwise you can't do two persistence update in one release. In this case you just need to apply |
Thanks for the feedback, I'll rework this and then update it. |
This provides a central place to perform incremental upgrades in our persistence layer. At the same time we can keep the code separated from the operational code base.
With this commit the upgrade process is hooked up and executed on every startup of qTox. What's missing is the integration of the new paths in qTox.
The current implementation was broken and wrote to the non portable directories even in portable mode. Since Paths now handles this correctly we can remove the Settings part and UI.
This is the rest of the changes for finishing #5410
These are not yet final so don't waste your time reviewing it.
This change is