>
> > 1) is it a bug that 'id' is generated as an 'integer' rather than
> 'serial'
> > type?
>
> I'd be curious as to how your DB got set up that way, since Django's
> table-creation routines map AutoField to SERIAL:
>
>
> http://code.djangoproject.com/browser/django/trunk/django/db/backends/postgresql/creation.py#L10
>
Define a models.py as:
from django.db import models
# Create your models here.
class Cardrange(models.Model):
minbin = models.DecimalField(max_digits=12, decimal_places=0)
maxbin = models.DecimalField(max_digits=12, decimal_places=0)
minpan = models.IntegerField()
maxpan = models.IntegerField()
... more fields and 'def __unicode__() ...
then run 'manage.py sysncdb'
Just dropped my table and re-created it, and the 'id' autogenerated field is
an integer as shown by pgadmin III.
>
> > 3) Failing that, is there a better way to do the raw SQL steps outlined
> > above?
>
>
> http://docs.djangoproject.com/en/dev/ref/django-admin/#sqlsequencereset-appname-appname
>
> Thanks, that's a bit nicer!
Ken
--
You received this message because you are subscribed to the Google Groups
"Django users" 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-users?hl=.