ko1eda / levelup-forum

Fully featured forum with Laravel 5.6 and Vue.js using Test Driven Development
4 stars 0 forks source link

When a user is deleted their relationships still remain #10

Closed ko1eda closed 6 years ago

ko1eda commented 6 years ago

Specifically thought about this in relation to their subscriptions, however in thinking more I realized that foreign key constraints have not been set on non-polymorphic relations as well.

Although the feature to delete your account has not been added yet it is important to note that when this feature is added to use a combination of model events (for polymorphic relations like subscriptions and notifications) and foreign key cascading for non polymorphic entities to accomplish this.

ko1eda commented 6 years ago

Addressed in 7b495a12d40d27e186d50f82c03b645c4b1d382d and ce42103505d4fc5624635635e78dd092ea00eb05