On Jan 31, 2:31 am, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > On Sat, 2009-01-31 at 12:20 +1100, Malcolm Tredinnick wrote: > > On Fri, 2009-01-30 at 09:49 -0800, mucisland wrote: > > > Hi all. > > > > If I specify the ForeignKey target model as a string because it is not > > > yet defined, the (SQLite3) SQL table entry misses the REFERENCES > > > specifier. Example: > > > SQLite doesn't support "references" constraints. So we don't bother > > writing them out (it doesn't support relations). There's no bug here. > > When I said "doesn't support relations", I meant "doesn't *enforce* > relations* at the database level. You can still use foreign keys and > many-to-many fields and the like in Django. But the data integrity at > the database level isn't enforced by SQLite.
Thanks for your answer, Malcolm! So I assume the PostgreSQL backend would write the references constrained into the SQL? And for the SQLite3 backend, it's strange that it sometimes writes the references constraint and sometimes not. I stress this point because I'd like to have a stable SQL database scheme before I enter my data. Loading serialized data into a changed database scheme is a PITA, or I just didn't find the right way to do it yet... Best Regards, Dirk --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---