-
Bug
-
Resolution: Done
-
Major
-
None
-
None
-
None
-
EnVision Sprint 39, EnVision Sprint 40
-
None
We allow our users to delete pubkeys which lead to immediate cascade deletion of reservation_detail. Problem is, there can be reservations scheduled, this then lead to missing record and failed reservations.
Let's not cascade and set NULL value for all the three providers. A foreign key change will be required for all three tables. Then modify the Go type to allow nil values and handle the errors gracefully. I suggest to error out with "pubkey not found (deleted?)" or something similar so the error immediately tells us/support/customer what happened.
Original description:
This error is scary, we create reservation and its detail in one transaction and never delete reservations for now. There is a foreign key (id, provider) between the two tables. Update should always end up with 1.