-- ============================================================================
-- Migration 014: Add e-conomic customer number to tmodule_customers
-- ============================================================================

-- Add e-conomic customer number field
ALTER TABLE tmodule_customers 
ADD COLUMN IF NOT EXISTS economic_customer_number INTEGER;

-- Add index for lookups
CREATE INDEX IF NOT EXISTS idx_tmodule_customers_economic 
ON tmodule_customers(economic_customer_number);

-- Add comment
COMMENT ON COLUMN tmodule_customers.economic_customer_number IS 
'e-conomic customer number for invoice export. Synced from vTiger cf_854 field.';
