BigInt / Long for Auto Incrementing PK

48 views
Skip to first unread message

Nicholas Haggmark

unread,
Jul 31, 2014, 11:34:17 AM7/31/14
to 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

unread,
Aug 1, 2014, 9:18:59 AM8/1/14
to django...@googlegroups.com
Hi, you can use a bigintegerfield and set it as primary-key.

Collin Anderson

unread,
Aug 1, 2014, 11:21:14 AM8/1/14
to 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

unread,
Aug 1, 2014, 4:53:41 PM8/1/14
to 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?
Reply all
Reply to author
Forward
0 new messages