Hi,
I'm trying to create a model with an unsigned integer field but I can't find how to do it with peewee.
Is this possible?
if you got here through google - like me - here is a quick solution which worked for my use case
uid = SmallIntegerField(null=True, constraints=[SQL("UNSIGNED")])
:+1: thanks for sharing @sooslaca
got this one worked:
class UnsignedIntegerField(IntegerField):
field_type = 'int unsigned'
(peewee 3.3.4)
@sooslaca
it doesn't work as you said.
You can use @binderclip snippet, which works for Peewee 3.x and newer.
Most helpful comment
got this one worked:
(peewee 3.3.4)