On 3/9/07, Jens Diemer <[EMAIL PROTECTED]> wrote: > > > I have a (old) Model like this: > ------------------------------------------------ > class SessionData(models.Model): > session_id = models.CharField(maxlength=96)
Change to: session_id = models.CharField(maxlength=96, primary_key=True) ... > OperationalError: (1054, "Unknown column 'pylucid_session_data.id' in > 'field list'") ... > > Yes, there is no column "id" for the table "pylucid_session_data". > Is that an error? Or must all tables have an ID? (or primary key?) If you don't specify a field with primary_key=True, Django automatically ads one named "id". See http://www.djangoproject.com/documentation/model_api/#automatic-primary-key-fields ... > I have made a small patch, so the table skipped: Ugh, don't do that. :) --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---