-- Migracja: usuniecie przestarzalej flagi is_performance_max
-- Data: 2026-02-17
-- Opis: pozostawiamy tylko advertising_channel_type jako zrodlo prawdy o typie kampanii

SET @sql = IF(
  EXISTS (
    SELECT 1
    FROM INFORMATION_SCHEMA.COLUMNS
    WHERE TABLE_SCHEMA = DATABASE()
      AND TABLE_NAME = 'campaigns'
      AND COLUMN_NAME = 'is_performance_max'
  ),
  'ALTER TABLE `campaigns` DROP COLUMN `is_performance_max`',
  'DO 1'
);
PREPARE stmt FROM @sql;
EXECUTE stmt;
DEALLOCATE PREPARE stmt;
