>
> All of this looks correct. Note the data type of integer is not wrong --
> serial is not a true data type. See:
>
> http://www.postgresql.org/docs/8.1/static/datatype.html#DATATYPE-SERIAL
>
>
>
>>
>>
> So, it has a sequence, but the sequence is out-of-sync (value=7) with the
>> actual DB (max
On Fri, Nov 20, 2009 at 9:25 AM, Ken MacDonald wrote:
> Hi,
> There's no 'id' in my other fields; the manage.py sql DOES report it as
> being 'serial', however the field definition in pgadmin III reports:
>
> -- Column: id
>
> -- ALTER TABLE cardtype_cardrange DROP COLUMN id;
>
> ALTER TABLE card
>
> 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 = mode
On Thu, Nov 19, 2009 at 4:50 PM, Ken MacDonald wrote:
> 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, dec
On Thu, Nov 19, 2009 at 4:50 PM, Ken MacDonald wrote:
> > 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.dj
>
> > 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/postgr
On Thu, Nov 19, 2009 at 1:57 PM, Ken MacDonald wrote:
> So, a couple questions:
>
> 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
I have a postgreSQL / psycopg2 DB generated by my Django model with a single
user table (normally read-only) that will be updated via batch job about
once a week. The PK is the autogenerated 'id' field; however in postgreSQL
the generated field is of type 'integer' rather than type 'serial' which i
8 matches
Mail list logo