feat(store): per-account folder_mapping + excluded_folders columns
This commit is contained in:
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE accounts DROP COLUMN excluded_folders;
|
||||
ALTER TABLE accounts DROP COLUMN folder_mapping;
|
||||
@@ -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;
|
||||
Reference in New Issue
Block a user