-- 10: Version20260426120000 — configocrdeployment.customer_match_log_enabled
SET NAMES utf8mb4;
SET @db := DATABASE();

SET @cfgcol := (
  SELECT COUNT(*) FROM information_schema.COLUMNS
  WHERE TABLE_SCHEMA = @db AND TABLE_NAME = 'configocrdeployment'
    AND COLUMN_NAME = 'customer_match_log_enabled'
);
SET @sql := IF(@cfgcol = 0,
  'ALTER TABLE `configocrdeployment` ADD COLUMN `customer_match_log_enabled` TINYINT(1) NOT NULL DEFAULT 0',
  'SELECT ''skip: customer_match_log_enabled already exists'' AS note');
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
