SeedCompany / cord-api-v3

Bible translation project management API
MIT License
18 stars 4 forks source link

[EdgeDB] Fix delete cascade #3159

Closed CarsonF closed 6 months ago

CarsonF commented 6 months ago

Following up on #3132

That PR added a on Project delete, delete ProjectContext. All project children are also configured to delete with Project as well. (src) But this sibling deletion chain was not respecting that sibling deletion chain.

So setting them both to chain deletes works.

In practice, I could see delete Project::Context deleting all directly associated objects (like this PR does), but I could also see it restricting because it still has things referenced. I guess our hand is forced though. These contexts should be rarely referenced anyways, and would/should never be deleted directly.

bryanjnelson commented 6 months ago

Thanks @CarsonF!