feat: Phase 1 tenant isolation — add account_id to all tenant tables #133

Merged
chihlasm merged 37 commits from feat/tenant-isolation-phase-1 into main 2026-04-10 04:57:53 +00:00
Showing only changes of commit 417fa562ce - Show all commits

View File

@@ -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