[Django] #26559: Way to specify length in IntegerField

16 views
Skip to first unread message

Django

unread,
Apr 29, 2016, 3:21:01 PM4/29/16
to django-...@googlegroups.com
#26559: Way to specify length in IntegerField
-------------------------------+--------------------
Reporter: monusurana | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.9
Severity: Normal | Keywords:
Triage Stage: Unreviewed | Has patch: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------
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'''

--
Ticket URL: <https://code.djangoproject.com/ticket/26559>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.

Django

unread,
Apr 29, 2016, 9:01:55 PM4/29/16
to django-...@googlegroups.com
#26559: Way to specify length in IntegerField
-------------------------------+--------------------------------------

Reporter: monusurana | Owner: nobody
Type: Uncategorized | Status: new
Component: Uncategorized | Version: 1.9
Severity: Normal | Resolution:
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------+--------------------------------------
Changes (by timgraham):

* needs_better_patch: => 0
* needs_tests: => 0
* needs_docs: => 0


Comment:

What database backend are you using?

--
Ticket URL: <https://code.djangoproject.com/ticket/26559#comment:1>

Django

unread,
Apr 30, 2016, 7:41:29 AM4/30/16
to django-...@googlegroups.com
#26559: Way to specify length in IntegerField
-------------------------------------+-------------------------------------
Reporter: monusurana | Owner: nobody
Type: Uncategorized | Status: closed
Component: Database layer | Version: 1.9
(models, ORM) |
Severity: Normal | Resolution: needsinfo
Keywords: | Triage Stage:
| Unreviewed

Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0

Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by timgraham):

* status: new => closed
* component: Uncategorized => Database layer (models, ORM)
* resolution: => needsinfo


--
Ticket URL: <https://code.djangoproject.com/ticket/26559#comment:2>

Reply all
Reply to author
Forward
0 new messages