-- Add RFQ/Quotation traceability to procurement_orders
ALTER TABLE procurement_orders
  ADD COLUMN rfq_id INT UNSIGNED NULL AFTER pr_id,
  ADD COLUMN quotation_id INT UNSIGNED NULL AFTER rfq_id,
  ADD INDEX idx_po_rfq (rfq_id),
  ADD INDEX idx_po_quotation (quotation_id);

-- Add RFQ/Quotation traceability to procurement_order_items
ALTER TABLE procurement_order_items
  ADD COLUMN rfq_item_id INT UNSIGNED NULL AFTER pr_item_id,
  ADD COLUMN quotation_item_id INT UNSIGNED NULL AFTER rfq_item_id;
