Hmmm... Good point. It's a production database and probably has developed some cruft over time. What's the best way to clean it up? Export it all to sql, edit it (or process it with a program) and re-import? Or is there an easier way?
On Sun, May 9, 2010 at 12:52 PM, Thadeus Burgess <thade...@thadeusb.com>wrote: > I have seen this quite a bit with my sqlite databases as well... > > Basically, this is what is happening. > > The referential integrity of your database is failing (IE: a FK links > to a record that does not exist). > > This has happened many many times, and when I do a csv export of my > database, sure enough there are records referencing non-existant > records. > > I have had this happen mostly on tables that contain self-references. > > The problem is that SQLITE does not enforce referential integrity, so > there is a bug somewhere in the code that allows you to link to > non-existant records. > > -- > Thadeus > > > > > > On Sun, May 9, 2010 at 1:25 PM, Joe Barnhart <joe.barnh...@gmail.com> > wrote: > > or when I try to view them in database admin! > > > > This is all using the built-in sqllite database and standard automatic > > "auth" tables. Here is an example of one of my own tables that now > > fails to view in databas >