Checklist
TagStudio Version
Alpha 9.6.0
Operating System & Version
Win11
Description
When migrations for versions are ran, they should take into account the possibility that the migration was already ran but the database version wasn't updated properly.
For example, drop table preferences may fail, because the table preferences no longer exists. In that case, since the table is already dropped, there is no reason to fail, and the program can simply continue.
Expected Behavior
TagStudio should catch errors with migrations and handle them, rather than aborting. Users can potentially be locked out of their libraries unless they are comfortable modifying the SQL database directly, which may also leave them in a different type of broken state.
Steps to Reproduce
To reproduce this naturally is difficult but can happen in a variety of circumstances. To artificially reproduce this issue:
- Open a library in the latest version and close tagstudio
- Edit the sql database to revert the
current version table down to a previous number (ie, from 201 to 103)
- Open tagstudio and attempt to load the library
Logs
Logs did not catch any errors that occurred.
Log
2026-07-04 19:57:36 [info ] [FFmpeg] Using FFprobe location: ffprobe (Found)
2026-07-04 19:57:36 [info ] [FFmpeg] Using FFmpeg location: ffmpeg (Found)
2026-07-04 19:57:37 [info ] [ResourceManager] Resources Registered: count=37
2026-07-04 19:57:37 [info ] [Settings] Global Settings File Path not specified, using default
2026-07-04 19:57:37 [info ] [Settings] Reading Global Settings File path=WindowsPath('C:/Users/USER/Appdata/Roaming/TagStudio/settings.toml')
2026-07-04 19:57:37 [info ] [Cache] Cache File not specified, using default one filename=C:/Users/USER/AppData/Roaming/TagStudio/TagStudio.ini
2026-07-04 19:57:39 [error ] Path does not exist. open_path=None
2026-07-04 19:57:39 [info ] [Library] Opening SQLite Library connection_string=sqlite:///D:\Files\MemesByDate\.TagStudio\ts_library.sqlite library_dir=WindowsPath('D:/Files/MemesByDate')
2026-07-04 19:57:42 [info ] [Config] Thumbnail Cache Size: 500 MB
2026-07-04 19:58:26 [info ] No Library to Close
2026-07-04 19:58:26 [info ] [SHUTDOWN] Ending Thumbnail Threads...
Checklist
TagStudio Version
Alpha 9.6.0
Operating System & Version
Win11
Description
When migrations for versions are ran, they should take into account the possibility that the migration was already ran but the database version wasn't updated properly.
For example,
drop table preferencesmay fail, because the tablepreferencesno longer exists. In that case, since the table is already dropped, there is no reason to fail, and the program can simply continue.Expected Behavior
TagStudio should catch errors with migrations and handle them, rather than aborting. Users can potentially be locked out of their libraries unless they are comfortable modifying the SQL database directly, which may also leave them in a different type of broken state.
Steps to Reproduce
To reproduce this naturally is difficult but can happen in a variety of circumstances. To artificially reproduce this issue:
currentversion table down to a previous number (ie, from201to103)Logs
Logs did not catch any errors that occurred.
Log