The fake cascade does not clear dimension rows, so ordering constraints cannot be tested #19
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What to build
InMemoryStore'sCascadeDeletePortremoves entries but leaves dimension values behind. Real SQLite removes them viaON DELETE CASCADE. The fake is therefore more forgiving than production, and one real constraint currently has no test because of it.delete_entries_by_date_rangemust resolve media before the cascade runs: deleting the entries removes their dimension rows too, so composing afterwards finds nothing and every photo and voice memo blob is orphaned silently. Today that ordering is protected only by the namemedia_of_entries_about_to_be_deleted. A test written against the fake would pass whichever order the code used, which is worse than no test.Make the fake cascade clear dimension values for the entries it deletes, then add the test that fails when the order is wrong.
Acceptance criteria
delete_entries_by_date_rangeclear_dataanddelete_user, which have the identical ordering requirementON DELETE CASCADEis confirmed to actually fire against a real database — it depends onforeign_keys(true)being set on the pool, without which SQLite ignores it silentlyBlocked by
None - can start immediately.