YAAMSOrg / yaams-server

Yet Another Airline Management System
BSD 3-Clause "New" or "Revised" License
2 stars 5 forks source link

Implement aircraft deletion #21

Open valentinberish4 opened 3 months ago

valentinberish4 commented 3 months ago

Aircrafts must be deletable. Maybe using the edit view?

flymia commented 3 months ago

It is important, that we check the DB for foreign keys - that is to say we have to decide what to happen if an aircraft gets deleted, which has flights all over the place. What should happen to that flight?

flymia commented 2 months ago

We have the problem, that the aircraft is constrained with the "aircraft_id" coloumn in the flights table. This blocks us from "just deleting" the aircraft.

I have a few ideas here, and since this is a rather "important" feature or something to think of, we need to up the priority on this one for Release 0.1

These two options are really everything I can think of. I like the first idea better, since the flights you once made with an aircraft are not magically gone, when deleting the aircraft. It still WAS flown with the aircraft.

But for this to work, we need to make sure the "set aircraft to inactive" function is a bit more complex than just setting a variable to false. Maybe through a different button on the edit page or something like that. It also needs to be logged.