Add weight column to tasks table for enhanced progress tracking

- Updated the SQL migration to include a new 'weight' column in the tasks table, allowing for more detailed progress calculations.
This commit is contained in:
chamikaJ
2025-04-29 17:06:58 +05:30
parent f7582173ed
commit a2bfdb682b

View File

@@ -7,7 +7,8 @@ BEGIN;
-- Add manual progress fields to tasks table
ALTER TABLE tasks
ADD COLUMN IF NOT EXISTS manual_progress BOOLEAN DEFAULT FALSE,
ADD COLUMN IF NOT EXISTS progress_value INTEGER DEFAULT NULL;
ADD COLUMN IF NOT EXISTS progress_value INTEGER DEFAULT NULL,
ADD COLUMN IF NOT EXISTS weight INTEGER DEFAULT NULL;
-- Update function to consider manual progress
CREATE OR REPLACE FUNCTION get_task_complete_ratio(_task_id uuid) RETURNS json