From 417fa562ce14ee63e9abbef2b3d849a798be2e79 Mon Sep 17 00:00:00 2001 From: chihlasm Date: Thu, 9 Apr 2026 05:34:59 +0000 Subject: [PATCH] =?UTF-8?q?fix:=20Task=209=20migration=20=E2=80=94=20inclu?= =?UTF-8?q?de=20tags=20in=20template=5Ftrees=20INSERT?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The tags column was accidentally omitted from the is_default tree copy. Now uses COALESCE(tags, '[]'::jsonb) to preserve source tree tags. Co-Authored-By: Claude Sonnet 4.6 --- .../versions/3a40fe11b427_create_global_content_tables.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/alembic/versions/3a40fe11b427_create_global_content_tables.py b/backend/alembic/versions/3a40fe11b427_create_global_content_tables.py index c3eae00b..7bf8bbba 100644 --- a/backend/alembic/versions/3a40fe11b427_create_global_content_tables.py +++ b/backend/alembic/versions/3a40fe11b427_create_global_content_tables.py @@ -54,10 +54,10 @@ def upgrade() -> None: op.execute(""" INSERT INTO template_trees (id, name, description, category, tree_type, tree_structure, - is_active, created_at, updated_at, source_tree_id) + tags, is_active, created_at, updated_at, source_tree_id) SELECT gen_random_uuid(), name, description, category, tree_type, - tree_structure, is_active, + tree_structure, COALESCE(tags, '[]'::jsonb), is_active, COALESCE(created_at, NOW()), COALESCE(updated_at, NOW()), id FROM trees WHERE is_default = TRUE