BigInt / Long for Auto Incrementing PK

48 vistas
Ir al primer mensaje no leído

Nicholas Haggmark

no leída,
31 jul 2014, 11:34:17 a.m.31/7/14
para django...@googlegroups.com
Hi Guys,

I need to create a couple of tables with 64-bit int data type primary keys.  I've been googling around and I haven't seen anything really recent in regards to this.  Does Django 1.7 support auto incrementing 64-bit int primary keys?  If not out of the box, does anyone have a reliable solution for this?

Thanks!

Nick Haggmark

Stefano Probst

no leída,
1 ago 2014, 9:18:59 a.m.1/8/14
para django...@googlegroups.com
Hi, you can use a bigintegerfield and set it as primary-key.

Collin Anderson

no leída,
1 ago 2014, 11:21:14 a.m.1/8/14
para django...@googlegroups.com
Hi, you can use a bigintegerfield and set it as primary-key.

But will it auto-increment when you save? 

Nicholas Haggmark

no leída,
1 ago 2014, 4:53:41 p.m.1/8/14
para django...@googlegroups.com
Hi guys,

I was aware that you could set the BigInt model type to PK, but there doesn't appear to be a good way to make it auto-increment. Also, will FK columns introspect it to a long correctly?
Responder a todos
Responder al autor
Reenviar
0 mensajes nuevos