This repository has been archived by the owner on Apr 3, 2024. It is now read-only.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Relational fields within the database were almost all set to the default of "No Action" on delete/update. This PR fixes that by making all optional fields set to null on delete, and all required fields cascade on delete. Updates cascade for all relations, however that shouldn't be relevant since Glimpse never updates IDs.
One problem introduced by this is that cascaded rows now won't show up as deleted/updated in audit logs. It also means that users can get around their permissions to delete/update on these types of rows. The best solution may be to manually implement cascading within the code, rather than having it fall back to the database, and then essentially revert this commit.
This PR also changes the blog post
author
field to not be required.This PR will require a database migration.