-- Projects: type, NAS paths, client folder roots

ALTER TABLE clients ADD COLUMN IF NOT EXISTS nas_folder TEXT;

ALTER TABLE cockpit_projects ADD COLUMN IF NOT EXISTS project_type VARCHAR(64) DEFAULT 'general';
ALTER TABLE cockpit_projects ADD COLUMN IF NOT EXISTS nas_path TEXT;
ALTER TABLE cockpit_projects ADD COLUMN IF NOT EXISTS nas_client_root TEXT;
ALTER TABLE cockpit_projects ADD COLUMN IF NOT EXISTS priority VARCHAR(16) DEFAULT 'normal';

CREATE INDEX IF NOT EXISTS idx_cockpit_projects_type ON cockpit_projects(project_type, status);
CREATE INDEX IF NOT EXISTS idx_cockpit_projects_client ON cockpit_projects(client_id, updated_at DESC);
