Opened 2 years ago

Closed 2 years ago

#26559 closed Uncategorized (needsinfo)

Way to specify length in IntegerField

Reported by: Monu Surana Owned by: nobody
Component: Database layer (models, ORM) Version: 1.9
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

If I use models.IntegerField(primary_key=True), the SQL equivalent is int(11) NOT NULL, but I wanted it as int(31) and there is no way to specify that

But if I use models.IntegerField(), without any arguments like primary_key or blank or null, the SQL equivalent is int(31) NOT NULL

Change History (2)

comment:1 Changed 2 years ago by Tim Graham

What database backend are you using?

comment:2 Changed 2 years ago by Tim Graham

Component: UncategorizedDatabase layer (models, ORM)
Resolution: needsinfo
Status: newclosed
Note: See TracTickets for help on using tickets.
Back to Top