Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
028444f
refactor: cleanup parameters of open_library and open_sqlite_library
Computerdores Jan 18, 2026
de0a5b5
doc: notes on what tables are affected by which migration steps
Computerdores Jan 18, 2026
c90cd66
refactor(migration order): move DBv6 repairs
Computerdores Jan 18, 2026
585ad97
refactor(migration order): move DBv8 repairs
Computerdores Jan 18, 2026
7121f72
refactor(migration order): move DBv9 repairs
Computerdores Jan 18, 2026
effdbb6
refactor(migration order): move DBv100 repairs
Computerdores Jan 18, 2026
02583c2
refactor(migration order): move DBv102 repairs
Computerdores Jan 18, 2026
e97e9a0
refactor: merge migration methods
Computerdores Jan 18, 2026
ecd9978
doc: final comment changes
Computerdores Jan 18, 2026
f28adfd
fix: query tag ids independent of future DB changes
Computerdores Jan 18, 2026
803410b
feat: remove preferences table
Computerdores Jan 18, 2026
50f8a71
refactor: various references to LibraryPrefs
Computerdores Jan 18, 2026
8a278fa
fix: update josn migration UI
Computerdores Jan 19, 2026
2d7251a
refactor: remove last vestiges of preferences table
Computerdores Jan 19, 2026
c911f47
fix: remove newly unnecessary translations
Computerdores Jan 21, 2026
1d92d4d
doc: document library format changes
Computerdores Jan 21, 2026
afeafc2
refactor: merge the two methods used for migration 104
Computerdores Jan 21, 2026
ee33346
fix: typo in sql statement
Computerdores Jan 21, 2026
19e03f7
fix: add back support for preferences table in get_version
Computerdores Jan 21, 2026
ec9f2af
fix: properly remove directory in test
Computerdores Jan 21, 2026
3bba604
fix: incorrect schema check in get_version
Computerdores Jan 21, 2026
f35ecc9
fix: update search lib via migration
Computerdores Jan 21, 2026
8a5b48d
fix: update assert in test
Computerdores Jan 21, 2026
ed66200
fix: ignore element order in assert in test
Computerdores Jan 21, 2026
e28f318
fix: use correct path
Computerdores Jan 21, 2026
95e3c60
fix: better test output
Computerdores Jan 21, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 10 additions & 2 deletions docs/library-changes.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,15 @@ Migration from the legacy JSON format is provided via a walkthrough when opening

| Used From | Format | Location |
| ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
| [#1139](https://github.com/TagStudioDev/TagStudio/pull/1139) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |
| [#1139](https://github.com/TagStudioDev/TagStudio/pull/1139) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |

- Adds the `is_hidden` column to the `tags` table (default `0`). Used for excluding entries tagged with hidden tags from library searches.
- Sets the `is_hidden` field on the built-in Archived tag to `1`, to match the Archived tag now being hidden by default.
- Sets the `is_hidden` field on the built-in Archived tag to `1`, to match the Archived tag now being hidden by default.

#### Version 104

| Used From | Format | Location |
| ----------------------------------------------------------------------- | ------ | ----------------------------------------------- |
| [#1298](https://github.com/TagStudioDev/TagStudio/pull/1298) | SQLite | `<Library Folder>`/.TagStudio/ts_library.sqlite |

- Removes the `preferences` table, after migrating the contained extension list to the .ts_ignore file, if necessary.
29 changes: 0 additions & 29 deletions src/tagstudio/core/enums.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,6 @@
# Created for TagStudio: https://github.com/CyanVoxel/TagStudio

import enum
from typing import Any
from uuid import uuid4


class SettingItems(str, enum.Enum):
Expand Down Expand Up @@ -57,30 +55,3 @@ class MacroID(enum.Enum):
BUILD_URL = "build_url"
MATCH = "match"
CLEAN_URL = "clean_url"


class DefaultEnum(enum.Enum):
"""Allow saving multiple identical values in property called .default."""

default: Any

def __new__(cls, value):
# Create the enum instance
obj = object.__new__(cls)
# make value random
obj._value_ = uuid4()
# assign the actual value into .default property
obj.default = value
return obj

@property
def value(self):
raise AttributeError("access the value via .default property instead")


# TODO: Remove DefaultEnum and LibraryPrefs classes once remaining values are removed.
class LibraryPrefs(DefaultEnum):
"""Library preferences with default value accessible via .default property."""

IS_EXCLUDE_LIST = True
EXTENSION_LIST = [".json", ".xmp", ".aae"]
3 changes: 1 addition & 2 deletions src/tagstudio/core/library/alchemy/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,9 @@
SQL_FILENAME: str = "ts_library.sqlite"
JSON_FILENAME: str = "ts_library.json"

DB_VERSION_LEGACY_KEY: str = "DB_VERSION"
DB_VERSION_CURRENT_KEY: str = "CURRENT"
DB_VERSION_INITIAL_KEY: str = "INITIAL"
DB_VERSION: int = 103
DB_VERSION: int = 104

TAG_CHILDREN_QUERY = text("""
WITH RECURSIVE ChildTags AS (
Expand Down
Loading