Efficient Progress Aggregation in a Deeply Nested Task Hierarchy with Real-Time Sync (PostgreSQL + PowerSync)
I’m developing a task management application with a deeply nested task hierarchy (mother-child tasks). Each task has the following structure (PostgreSQL schema): sql id UUID PRIMARY KEY, creator_id UUID, task TEXT, is_done BOOLEAN, mother_task UUID REFERENCES tasks(id), estimated_progress_duration_in_seconds INTEGER, current_progress_duration INTEGER

I’m developing a task management application with a deeply nested task hierarchy (mother-child tasks). Each task has the following structure (PostgreSQL schema):
sql
id UUID PRIMARY KEY,
creator_id UUID,
task TEXT,
is_done BOOLEAN,
mother_task UUID REFERENCES tasks(id),
estimated_progress_duration_in_seconds INTEGER,
current_progress_duration INTEGER