Fix sqlite on delete cascade handling.