Nostromos / what.ecom

PERN Ecom app for Codecademy's Full Stack path.
MIT License
0 stars 0 forks source link

Postgres - Need to set up cascading deletes or CTEs to facilitate cart clears/updates #54

Open Nostromos opened 8 months ago

Nostromos commented 8 months ago

Right now, all deletes are manual and specified. There are two ways to handle deletes as I see it:

  1. Set up cascading deletes (or updates) between carts and products_carts - the benefit here is that simply deleting the cart (or marking its status as inactive) would cascade to products_carts.
  2. Common Table Expressions - this very good answer on SO explains it.