I am just participating in sqlite, so I was surprised to see that my foreign_key restriction did not work when I was able to delete the parent record. After that, I found out that the pragma for foreign_key is disabled by default for each session. It seems strange there is no resource file (e.g. .exrc for vi, for example) that you can use to configure default pragmas for each session, but fine. So I have to recompile sqlite3 or just install it every time.
In any case, my question is that after I deleted the parent, is there a way to check the integrity of the mail against foreign key restrictions? That is, just tell sqlite to run the same logic as it does when it does it initially, if you included the pragma during insert or delete, etc.?
I see "pragma integrity_check", but it's just a search for corruption it seems.
Thanks Justin
source share