-- Migration 011: normaliza collation das colunas usadas em UNION
-- Sintoma: "Illegal mix of collations for operation 'UNION'" ao cruzar
-- harvest_queried.bvdr_serial com tachograph_keys.tachograph_serial.
--
-- Solucao: ambas colunas com utf8mb4_unicode_ci (mesma do resto do schema novo).
-- Idempotente: ALTER reaplicado e' no-op.

ALTER TABLE harvest_queried
  MODIFY COLUMN bvdr_serial VARCHAR(20)
  CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;

ALTER TABLE tachograph_keys
  MODIFY COLUMN tachograph_serial VARCHAR(40)
  CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL;
