True, but the FOREIGN KEY constraints generated are merely ignore by
sqlite.

However, the CREATE statement should be correct because when I port
this to say MySQL, it will be a problem.

For any other example the FOREIGN KEY constrains are generated
corrcetly in sqlite (athough they are ignore by the sqlite engine.
)

On Sep 9, 9:33 am, Daniel Roseman <dan...@roseman.org.uk> wrote:
> On Sep 9, 5:29 pm, jim <jimmy.john...@gmail.com> wrote:
>
>
>
> > Am using sqlite3 and django version 1.0
>
> > class U(models.Model):
> >     woid = models.ForeignKey('workorder.X')
>
> > In the workorder app I have:
>
> > class X(models.Model):
> >     woid = models.CharField(max_length=20, primary_key=True)
>
> > When I try :
>
> > python manage.py sql ceuser
>
> > I get....
>
> > CREATE TABLE "ceuser_u" (
> >     "id" integer NOT NULL PRIMARY KEY,
> >     "woid_id" varchar(20) NOT NULL
> > )
> > ;
>
> > As can be seen, the class ceuser does not have the FOREIGN KEY
> > constraint...
>
> > seen some threads abut it but no solution...
>
> Sqlite does not support foreign key constraints. 
> Seehttp://www.sqlite.org/omitted.html
> --
> DR
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to