On Wed, 2007-02-21 at 15:12 -0800, [EMAIL PROTECTED] wrote: > Hi, > > I'm just learning Django, so I apologize in advance for what may be a > remedial question, but here goes: > > I created two models. In the first, I defined the Primary Key to be a > 60 character CharField into which I'm putting a UUID (uuid.uuid4(), to > be specific). > > In the second model, I created a OneToOneField that linked back to the > first model. > > When Django auto generated the sql for the second table, the primary/ > foreign key column it created was of type Integer. That's a type > mismatch with the primary key field in the first table. > > I overcame this by editing the SQL before running it, but syncdb > doesn't work, and it's an added step I have to remember to do > (unsafe). > > Is there a way to tell OneToOneField that it should be creating a 60ch > CharField instead of an Integer field?
I have a feeling there is a ticket open about this somewhere (I remember working on code for it at one point). This just jogged my memory, so I'll hunt round in my repository and get a fix committed, as well as trying to find the ticket. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---