python - Auto_increment custom Primary Key in Peewee model -


i want primary key id field bigint

class tweets(model):     id = bigintegerfield(primary_key=true)     ... 

but needs auto_incremented , can't find way in peewee docs. please suggest if it's possible.

update: i'm using mysql db.

peewee automatically generates integer id column serving primary key, having auto_increment property. true table create peewee.

it integerfield enough needs; bigintegerfield useful. need numbers bigger 2147483647? insert more 2 billion rows?

see: http://dev.mysql.com/doc/refman/5.5/en/integer-types.html


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -