From 660cc406b5cb48406251775e1ada126701e9cf4f Mon Sep 17 00:00:00 2001 From: Jann Stute Date: Mon, 6 Jul 2026 18:44:03 +0200 Subject: [PATCH] fix(db migration 8): only add colors that are actually new DB Migration 8 was previously adding all colors except for the neon ones, however, all but three of those have been around since DB version 4, meaning that they don't need to be added at all (which caused the tests to fail). --- src/tagstudio/core/library/alchemy/library.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/tagstudio/core/library/alchemy/library.py b/src/tagstudio/core/library/alchemy/library.py index 3684b606..5513c26b 100644 --- a/src/tagstudio/core/library/alchemy/library.py +++ b/src/tagstudio/core/library/alchemy/library.py @@ -633,12 +633,11 @@ class Library: logger.info("[Library][Migration][8] Added color_border column to tag_colors table") # collect new default tag colors - tag_colors: list[TagColorGroup] = default_color_groups.standard() - tag_colors += default_color_groups.pastels() - tag_colors += default_color_groups.shades() - tag_colors += default_color_groups.grayscale() - tag_colors += default_color_groups.earth_tones() - # tag_colors += default_color_groups.neon() # NOTE: Neon is handled separately + tag_colors: list[TagColorGroup] = [ + color + for color in default_color_groups.shades() + if color.slug in ["burgundy", "dark-teal", "dark_lavender"] + ] # Add any new default colors introduced in DB_VERSION 8 for color in tag_colors: