Skip to content
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

Implement aircraft deletion #21

Open
valentinberish4 opened this issue Apr 6, 2024 · 2 comments
Open

Implement aircraft deletion #21

valentinberish4 opened this issue Apr 6, 2024 · 2 comments
Labels
backend enhancement New feature or request

Comments

@valentinberish4
Copy link
Collaborator

Aircrafts must be deletable. Maybe using the edit view?

@flymia flymia added the enhancement New feature or request label Apr 7, 2024
@flymia
Copy link
Collaborator

flymia commented Apr 8, 2024

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 flymia added the backend label Apr 8, 2024
@flymia
Copy link
Collaborator

flymia commented Apr 14, 2024

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

  • Just don't allow deleting it, rather just set it as "inactive".
  • Set the aircraft of a flight to NULL, so it get's displayed as "unknown" in the flights table.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants