Checklist
TagStudio Version
Alpha 9.5.6 / latest git
Operating System & Version
--
Description
The library backup created when opening a library of older than expected version1 is only saved after some write operations have taken place.
One such write operation is the update of the library version2, which would mean that restoring from the backup is going to likely fail, since TS will assume that migrations that haven't been applied have already been applied.
Expected Behavior
Any write operations should only happen after a backup has been created, unless the library is already of the current version.
Steps to Reproduce
--
Logs
--
Checklist
TagStudio Version
Alpha 9.5.6 / latest git
Operating System & Version
--
Description
The library backup created when opening a library of older than expected version1 is only saved after some write operations have taken place.
One such write operation is the update of the library version2, which would mean that restoring from the backup is going to likely fail, since TS will assume that migrations that haven't been applied have already been applied.
Expected Behavior
Any write operations should only happen after a backup has been created, unless the library is already of the current version.
Steps to Reproduce
--
Logs
--
Footnotes
see https://github.com/TagStudioDev/TagStudio/blob/main/src/tagstudio/core/library/alchemy/library.py#L535 ↩
see https://github.com/TagStudioDev/TagStudio/blob/c4c749650ffd67ce784406935663f893072b6d27/src/tagstudio/core/library/alchemy/library.py#L460 ↩