Uploaded image for project: 'Insights Experiences'
  1. Insights Experiences
  2. HMS-2757

Do not cascade on pubkey delete

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • None
    • None
    • Provisioning
    • 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.

              avitova Anna Vitova
              rhn-engineering-lzapletal Lukáš Zapletal
              None
              None
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: