Easy, add a leading 0... Oh wait they probably store them as integers, but then it wouldn't matter how many digits... Oh wait some places it's fixed length strings
trailing zero works with integer storage,
i.e. old 1234 becomes 12340 and new flight number could be 12345.
Mentally if the number has significance for sort order etc, you can think they are like decimals they would be 1234.0 and 1234.5, when not set in older systems it can be ignored i.e. 1234.0 is same as 1234.
There's a decent chance that several important airline systems are storing things in fixed-width fields, so that, e.g., the flight number is columns 25-28.