chicken-sloths / bangazon-api-sprint1

API for a mock Amazon + Etsy platform providing developers access to the company's employee & product data
0 stars 0 forks source link

Add Cascading Delete to Order Table/ Product_Order Join Table #110

Closed joechesney closed 6 years ago

joechesney commented 6 years ago

Context

  1. What should the feature do?
    • This feature should make sure that when an Order is deleted, that every row associated with that order is also deleted from the Product_Order table.
  2. When and where should the feature appear?
    • I believe that all we need to do is add the attribute ON DELETE CASCADE to the primary key. BUT I COULD BE WRONG. THERE MIGHT BE MORE TO IT. I would google it and see if theres more to it. and then test it a bunch.

      Associated Product Ticket

Process

  1. Potential Impact on Code or Other Features
    • There is already a DELETE function in the Orders section of code.
  2. Suggested Implementation
    • Expected Result

      When an Order is deleted, it should also delete any associated rows on the Product_Order join table.