fix: Task 9 migration — include tags in template_trees INSERT
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 <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user