feat(store): per-account folder_mapping + excluded_folders columns

This commit is contained in:
2026-07-03 11:39:21 +07:00
parent e7870c6aa4
commit d6d17ee544
4 changed files with 71 additions and 15 deletions
@@ -0,0 +1,6 @@
ALTER TABLE accounts ADD COLUMN folder_mapping JSONB NOT NULL DEFAULT '{}';
ALTER TABLE accounts ADD COLUMN excluded_folders JSONB NOT NULL DEFAULT '[]';
-- Carry the existing task-wide mapping onto its accounts so behavior is preserved.
UPDATE accounts a SET folder_mapping = t.folder_mapping
FROM tasks t WHERE a.task_id = t.id AND t.folder_mapping <> '{}'::jsonb;