-- Migration: widen origin_icao / destination_icao in flight_tracks_fa
-- Reason: FA API sometimes returns coordinates (e.g. 'L 55.61740 39.72253')
-- instead of ICAO codes; VARCHAR(5) is too short for such values.
-- fa_worker.py now filters these out via _icao_or_none(), but this migration
-- prevents errors on any already-stored bad data and makes the column resilient.

ALTER TABLE fr24_ext.flight_tracks_fa
    ALTER COLUMN origin_icao      TYPE VARCHAR(20),
    ALTER COLUMN destination_icao TYPE VARCHAR(20);
