fac24 / week6-bereket-hussain-joe-sonia

https://week6-bereket-hussain-joe-sonia.vercel.app/
0 stars 0 forks source link

Unnecessary CASCADE? #31

Open lascellesabercrombie opened 2 years ago

lascellesabercrombie commented 2 years ago

https://github.com/fac24/week6-bereket-hussain-joe-sonia/blob/dd48edae591844451ef295da7a8b37137a687c07/src/database/init.sql#L3

Since you're working with one table, I wasn't sure if the CASCADE was necessary. (I think this is about following up on foreign keys and deleting there too.) On the other hand, I don't think it hurts.

joe-dev-public commented 2 years ago

Indeed, it's not necessary ☺️

(But I imagine if we removed it and then did have other tables, we'd forget to put it back for a bit at least :)