Skip to content

Commit

Permalink
feat(aircraft): improve aircraft data (#21)
Browse files Browse the repository at this point in the history
* alphabetizing ATR42/72

* alphabetized Airbus, added missing airbus models

* re-classifying AN-225 as a Jumbo aircraft

* add missing ATR models

* sorting Antonov aircraft

* messed up A sorting, moved agusta

* moving ayres and avro, added Avro RJ70 and Avro RJ85

* moving ayres and avro, added Avro RJ70 and Avro RJ85

* sorting BAE146, updating names with the type designation

* messed up sorting

* sorted Boeing Aircraft and added missing models

* removing RJX since this type is not in the ICAO list of aircraft

* removing duplicate antonovs

* moving Beechcraft

* sorting CRJ's, adding CRJ-100/200/550/700/1000

* adding A300-600

* fix: replace invalid ICAO E175 with E75S and E75L

* fix: remove duplicate entries

* fix: migrate "invalid" ICAO aircraft type codes to valid equivalents

---------

Co-authored-by: Johan Ohly <johanohly@gmail.com>
  • Loading branch information
chris-pryazhentsev and johanohly authored Oct 6, 2024
1 parent 7f1cbde commit d3e5610
Show file tree
Hide file tree
Showing 2 changed files with 351 additions and 232 deletions.
19 changes: 19 additions & 0 deletions prisma/migrations/20241006184406_icao_aircraft_codes/migration.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
UPDATE flight
SET aircraft = CASE aircraft
WHEN 'A330' THEN 'A333'
WHEN 'EMB1' THEN 'E120'
WHEN 'EMB4' THEN 'E145'
WHEN 'EMB7' THEN 'E170'
WHEN 'A350' THEN 'A359'
WHEN 'A380' THEN 'A388'
WHEN 'B737' THEN 'B738'
WHEN 'B747' THEN 'B744'
WHEN 'B767' THEN 'B763'
WHEN 'B777' THEN 'B772'
WHEN 'B787' THEN 'B789'
WHEN 'AN124' THEN 'A124'
WHEN 'AN225' THEN 'A225'
ELSE aircraft
END
WHERE aircraft IN
('A330', 'EMB1', 'EMB4', 'EMB7', 'A350', 'A380', 'B737', 'B747', 'B767', 'B777', 'B787', 'AN124', 'AN225');
Loading

0 comments on commit d3e5610

Please sign in to comment.