I did it, but its not showing up the new field(which is "summary" in my case) in the Create Statement, nor is at the Alter table part.
On Dec 20, 5:59 pm, "Patryk Zawadzki" <[EMAIL PROTECTED]> wrote: > 2007/12/20, madhav <[EMAIL PROTECTED]>: > > > > > > > as a part of using generic relations, i got struck up at one point, > > where i need to run the sql to have a field: > > summary = generic.GenericRelation(Summary) > > > where Summary is a class defined as: > > class Summary(models.Model): > > id = models.AutoField(primary_key=True) > > content_type = models.ForeignKey(ContentType) > > content_object = generic.GenericForeignKey() > > created_on = models.DateTimeField(auto_now_add= True) > > modified_on = models.DateTimeField(auto_now= True) > > > And I am using a class called Book which will be having the summary > > field mentioned above. So to alter the Book model at the database > > level, i need to run the alter table for Book. I dont know the > > equivalent sql to create a generic relation column in the table. > > Just run ./manage.py sql <yourapp> and see the output. > > -- > Patryk Zawadzki > PLD Linux Distribution --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-developers?hl=en -~----------~----~----~----~------~----~------~--~---
