Index: db-scripts/migrations/V001__expand_tasks_table.sql
===================================================================
--- db-scripts/migrations/V001__expand_tasks_table.sql	(revision 194c01621e96510fb6f238b2098a64b3663ec780)
+++ db-scripts/migrations/V001__expand_tasks_table.sql	(revision 194c01621e96510fb6f238b2098a64b3663ec780)
@@ -0,0 +1,44 @@
+-- Flyway Migration: Expand TASKS table with description, due_date, priority, and status enum
+-- This migration adds new columns to support custom tracking tasks with enhanced details.
+-- Daily discipline tasks will use NULL for these optional fields.
+
+SET search_path TO trekr;
+
+-- Create ENUM type for task status
+CREATE TYPE task_status AS ENUM ('NOT_STARTED', 'IN_PROGRESS', 'FINISHED');
+
+-- Add new columns to TASKS table
+ALTER TABLE trekr.tasks
+ADD COLUMN description TEXT,
+ADD COLUMN due_date DATE,
+ADD COLUMN priority VARCHAR(10) DEFAULT 'MEDIUM' CHECK (priority IN ('LOW', 'MEDIUM', 'HIGH')),
+ADD COLUMN status task_status DEFAULT 'NOT_STARTED';
+
+-- For backwards compatibility, migrate is_finished to status
+-- is_finished = true → status = FINISHED
+-- is_finished = false → status = NOT_STARTED
+UPDATE trekr.tasks
+SET status = CASE
+    WHEN is_finished = true THEN 'FINISHED'::task_status
+    ELSE 'NOT_STARTED'::task_status
+END;
+
+-- Drop the is_finished column (after migration)
+ALTER TABLE trekr.tasks
+DROP COLUMN is_finished;
+
+-- Add index for filtering tasks by status and custom_tracking_id
+CREATE INDEX idx_tasks_custom_tracking_status
+ON trekr.tasks(custom_tracking_id, status)
+WHERE custom_tracking_id IS NOT NULL;
+
+-- Add index for filtering by discipline_user_id and status (for daily completion computation)
+CREATE INDEX idx_tasks_discipline_status
+ON trekr.tasks(discipline_user_id, status)
+WHERE discipline_user_id IS NOT NULL;
+
+-- Add index for due_date filtering (useful for reports)
+CREATE INDEX idx_tasks_due_date
+ON trekr.tasks(due_date)
+WHERE due_date IS NOT NULL;
+
Index: db-scripts/tunnel_scripta.sh
===================================================================
--- db-scripts/tunnel_scripta.sh	(revision 42da64dc0d28f9380336816f6fb82c7572d0021d)
+++ db-scripts/tunnel_scripta.sh	(revision 194c01621e96510fb6f238b2098a64b3663ec780)
@@ -5,7 +5,7 @@
 echo "AKO SAKATE DA SLUSHA NA DRUGA PORTA, SMENETE JA SKRIPTATA SOODVETNO"
 echo "AKO SAKATE DA STOPIRATE (CTRL+C)"
-read -p "Press any key to continue ..."
 
-ssh -v -2 -C -N -L 9999:localhost:5432 t_trekr@194.149.135.130
+
+sshpass -p '459499b8' ssh -v -2 -C -N -L 9999:localhost:5432 t_trekr@194.149.135.130
 
 echo "VRSKATA TREBA DA STOI OTVORENA SE DODEKA IMATE PRISTAP DO SERVEROT"
@@ -13,3 +13,2 @@
 echo "AKO TOA SE SLUCHILO SAMO OD SEBE, IMATE PROBLEM SO VOSPOSTAVUVANJE"
 echo "NA VRSKATA DO SERVEROT (BLOKADA) ILI VI SE POGRESHNI PARAMETRITE"
-read -p "Press any key to continue ..."
