comp426-2023-spring / a99-TeamNoTeam

GNU General Public License v3.0
0 stars 0 forks source link

Database update #61

Closed baileymeredith closed 1 year ago

baileymeredith commented 1 year ago

What's New In This PR:

I reset the database to fix an error that I had forgotten about when designing the database Before, if a user had posted reviews to the site and then tried to delete their account, a Foreign Key constraint error would occur. This is because the reviews table relies on the users table. I added "ON DELETE CASCADE" to the foreign key constraint in our reviews table and now this problem is gone. When a user deletes their account, all of their reviews will also be successfully deleted. This is why I had to reset the database though.