-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add new fields for Tail Number and Airline #56
base: main
Are you sure you want to change the base?
Conversation
- Updated models for new tail_number and airline string fields - Confirmed that existing database migration functions work with new fields - Fixes pbogre#8
Hey @moshobo, thanks a lot for taking the initiative to open this PR! I appreciate the contribution. I agree with the changes you have made, I just have a few remarks about implementation details.
Again, thanks a lot for your contributions! |
Thanks for taking a look, @pbogre. Here are my thoughts to your response:
I'll make changes to this PR in the coming days to update the following:
|
For the airline database, make sure you follow steps similar to how the airports database was adapted(docs) and used in the backend ( Since that database is quite old, feel free to look for another one that is more recent. I tried looking but didn't find much. When you get to a point where it has been adapted properly for jetlog, make sure you document the exact commands used in the process so that it can be easily updated in the future. If you stick to SQLite cli for this process, you can simply paste your history from This change would also require another router, pretty much a clone of the airport one, at After further thought about changing the type of flight number, I actually think it is best if we keep it as a string. Not only would the change require a decent amount of added code complexity, because of having to deal with backward compatibility (imagine what issues would arise if someone misspelled their flight number, for instance), but it would have little to no gain at this point. This is because we don't actually do any statistics with the flight number alone, so we might as well let people choose if they want to use it as a string or a number. It could be changed in the future if we choose to do some statistics with the flight number, but for now I would say to keep it as a string on frontend & backend. Thanks again for working on this :) |
@pbogre I've been looking around for databases of airline information, but all of them seem to be very outdated. I did manage to get an up-to-date CSV file that I made myself, but I'm not sure what you think of that. I could commit the .csv file to this project, then in the future if another source becomes available, it can be replaced? |
9cd1603
to
b2d0c25
Compare
- Added support for two new flight fields, tailNumber and airline - Updated flight information displays to show new fields - Updated 'new flight' and 'edit flight' workflows to include new fields - Split existing 'flight number' to just be an int/num, while airline will handle carrier code - Fixes pbogre#8
May I ask where you got the airline information from? As for the csv file, it would be nice if you could convert it to an sqlite database (it's quite simple, just a couple of commands), and then commit that to this PR so that i can review it. Regarding some database, I was able to find this database of airlines (stored in javascript, which would have to be changed to an sqlite db) from a similar project. If your custom csv has less airlines than the ones found here, you could add them or use this file directly. |
Closes #8
Add the following additional fields for flights:
tail_number
: String field for the tail number of the aircraft (ex:N896FD
)airline
: The 3-letter ICAO code of the airline operating the flight (ex:BAW
)I believe both of these fields will add a great additional dimension to flights, and the airline one in particular has already been requested as issue #8. I am also working on a PR for #51, which would greatly benefit from having a separate airline field, since that is data that was already stored.
Additionally, I started to enforce more that the airline code should be in ICAO format. Hopefully later on, this value can be used to display a more readable version of the airline (ex: Delta Airlines). It seems that the ICAO format was already preferred for airports, so I stuck to that.
Another minor change was to start enforcing that users must input the
flight_number
as anumber
going forward instead of astring
.Screenshots
All Flights
Add New Flight
Flight Details