-- Migration: Add fk_product field to planning_job table
-- Date: 2026-01-22
-- Purpose: Link planning jobs to FG products for loading cycle_time (qty per hour) from product extrafields
-- Future: TG2.1 will use product.extrafields.cycle_time for duration calculation

ALTER TABLE llx_planning_job ADD COLUMN fk_product INT NULL DEFAULT NULL AFTER fk_mo;

-- No UPDATE needed - fk_product starts as NULL, TG2.1 will use estimated_hours as fallback
